GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific package file from a package within a project on GitLab using the GitLab API. It is useful for managing and cleaning up package files in GitLab projects, especially when certain package files are no longer needed or need to be removed for maintenance or security reasons. For example, a user can delete outdated or vulnerable package files from their project's package registry.

Use Case Examples

  1. Deleting a package file by specifying the project ID, package ID, and package file ID to remove obsolete files from a GitLab project.
  2. Automating cleanup of package files in CI/CD pipelines to maintain a clean package registry.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request, useful for public or unauthenticated endpoints.
Authentication Type of authentication to use 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 used for this operation.
Path Parameters Parameters required in the API request path to identify the project, package, and package file to delete.

Output

JSON

  • success - Indicates whether the package file was successfully deleted (true/false).
  • statusCode - HTTP status code returned by the API indicating the result of the delete operation.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID, package ID, and package file ID are correct and exist in GitLab to avoid 404 Not Found errors.
  • Check that the API key used has sufficient permissions to delete package files in the project to avoid 403 Forbidden errors.
  • Verify the base URL is correct if using a self-hosted GitLab instance to avoid connection errors.

Links

Discussion