GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the container registry repositories for a specific project in GitLab using the GitLab API v4. It is useful for DevOps and development teams who want to programmatically access and manage container images stored in GitLab's container registry associated with their projects. For example, it can be used to list all container repositories for a project, including pagination and filtering options such as including tags or tag counts.

Use Case Examples

  1. Listing container registry repositories for a project to monitor stored images.
  2. Automating cleanup or auditing of container images in a GitLab project registry.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for 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, default is GET.
Query Parameters Optional query parameters to control pagination and filtering of the container registry repositories.
Path Parameters Path parameters specifying the project identifier for which to retrieve container registry repositories.

Output

JSON

  • repositories
    • tags - Tags associated with each container repository (if requested)
    • tags_count - Count of tags for each repository (if requested)
  • pagination
    • page - Current page number of the results
    • per_page - Number of items per page in the results
    • total - Total number of repositories available

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID or path provided in the path parameters is correct and accessible with the provided authentication.
  • Verify that the API token has sufficient permissions to access the container registry of the project.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid project ID or no access), and 400 Bad Request (invalid query parameters). Resolving these involves correcting credentials, project identifiers, or query parameters.

Links

Discussion