GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes the artifacts of a specific project in GitLab using the GitLab API. It is useful for automating the cleanup of project artifacts, such as build or pipeline artifacts, to manage storage and maintain project hygiene. For example, a user can configure this node to delete artifacts from a project identified by its ID or URL-encoded path.

Use Case Examples

  1. Automate deletion of old build artifacts from a GitLab project to free up storage space.
  2. Integrate artifact cleanup into a CI/CD pipeline to ensure only relevant artifacts are retained.

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 authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the API request, default is GET but DELETE is typically used for this operation.
Path Parameters Parameters to specify the project ID or URL-encoded path for which artifacts will be deleted.

Output

JSON

  • statusCode - HTTP status code returned by the API after the delete operation.
  • responseBody - Response body returned by the API, typically empty or confirmation message after deletion.

Dependencies

  • GitLab API key credential for authentication.

Troubleshooting

  • Ensure the project ID or URL-encoded path is correctly specified in the path parameters to avoid 404 errors.
  • Verify that the API key has sufficient permissions to delete project artifacts to prevent authorization errors.
  • Check the base URL if using a self-hosted GitLab instance to ensure the request is sent to the correct server.

Links

Discussion