GitLab API icon

GitLab API

Gitlab

Actions880

Overview

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

Use Case Examples

  1. Deleting a package file by specifying the project ID, package ID, and package file ID to remove obsolete files.
  2. Automating cleanup of package files in CI/CD pipelines to ensure only relevant files are retained.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated access scenarios.
Authentication Type of authentication to use, defaulting to GitLab API authentication.
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, package, and package file to delete.

Output

JSON

  • statusCode - HTTP status code returned by the GitLab API indicating the result of the delete operation
  • responseBody - Response body from the GitLab API, typically empty for successful delete operations

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID, package ID, and package file ID are correct and exist in the GitLab instance to avoid 404 Not Found errors.
  • Check that the authentication token 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