GitLab API

GitlabTool

Actions905

Overview

This node operation deletes all artifacts for a specified project in GitLab using the GitLab API. It is useful for cleaning up or managing storage by removing build artifacts associated with a project. For example, a DevOps engineer might use this node to automate the cleanup of old CI/CD artifacts to free up space.

Use Case Examples

  1. Deleting artifacts of a project by providing the project ID or URL-encoded path.
  2. Automating artifact cleanup in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, which is DELETE for this operation.
Path Parameters The path parameters for the request, specifically the project ID or URL-encoded path to identify the project whose artifacts will be deleted.

Output

JSON

  • statusCode - HTTP status code of the delete operation response
  • body - Response body from the GitLab API after deleting artifacts, typically empty or confirmation message

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct and accessible with the provided authentication.
  • Check that the authentication credentials are valid and have sufficient permissions to delete artifacts.
  • Verify the base URL is correct if using a self-hosted GitLab instance.
  • Common error messages include 404 Not Found if the project does not exist or 403 Forbidden if permissions are insufficient.

Links

Discussion