GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves detailed information about a specific container registry repository in GitLab using the GitLab API v4. It is useful for DevOps and development teams managing container images stored in GitLab's container registry, allowing them to fetch repository metadata, optionally including tags, tag counts, and size information. For example, it can be used to monitor repository usage or automate cleanup tasks based on repository details.

Use Case Examples

  1. Fetch details of a container registry repository by its ID to display metadata in a dashboard.
  2. Retrieve repository tags and their counts to analyze image versions stored in the registry.
  3. Get the size of a container registry repository to monitor storage usage and optimize costs.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request.
Authentication The authentication method used for the API request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, defaulting to GET.
Query Parameters Optional query parameters to include in the API request, such as whether to include tags, tags count, and size information.
Path Parameters Path parameters for the API request, specifically the repository ID to identify which container registry repository to retrieve.

Output

JSON

  • id - The unique identifier of the container registry repository.
  • name - The name of the container registry repository.
  • path - The path of the repository within the container registry.
  • location - The location URL of the repository.
  • tags - List of tags associated with the repository, if requested.
  • tags_count - The count of tags in the repository, if requested.
  • size - The size of the repository, if requested.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the repository ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API authentication token or key is correctly configured and has sufficient permissions to access container registry repositories.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • If query parameters like tags, tags_count, or size are not returning expected data, verify that the repository actually contains tags or size information and that the API version supports these parameters.

Links

Discussion