GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific package protection rule from a project in GitLab. It is useful for managing project package security by removing outdated or unnecessary protection rules. For example, a user can automate the cleanup of package protection rules in their CI/CD pipeline to maintain project security policies.

Use Case Examples

  1. Deleting a package protection rule by specifying the project ID and the package protection rule ID.
  2. Automating the removal of package protection rules as part of project maintenance workflows.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is 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 the package protection rule to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response.
  • body - Response body from the GitLab API after attempting to delete the package protection rule.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and package protection rule ID are correct and exist in GitLab.
  • Verify that the API key has sufficient permissions to delete package protection rules.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the IDs are incorrect, and 403 Forbidden if the API key lacks permissions.

Links

Discussion