GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific container registry repository from a GitLab project using the GitLab API. It is useful for managing container registries by removing repositories that are no longer needed or to clean up storage. For example, a DevOps engineer can automate the deletion of outdated container images from a project's registry to maintain a clean and efficient environment.

Use Case Examples

  1. Deleting a container registry repository by specifying the project ID and repository ID to free up storage space.
  2. Automating cleanup of container registries in CI/CD pipelines by removing unused repositories.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters required in the URL path to identify the project and repository to delete.

Output

JSON

  • success - Indicates whether the deletion was successful.
  • statusCode - HTTP status code returned by the API.
  • message - Additional message or error information from the API response.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and repository ID are correct and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to delete container registry repositories.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project or repository does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion