GitLab API icon

GitLab API

Gitlab

Actions917

Overview

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

Use Case Examples

  1. Deleting a package protection rule by specifying the project ID and the package protection rule ID to maintain project security policies.
  2. Automating the removal of package protection rules when a project is archived or no longer requires certain package restrictions.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used for the request, defaulting to 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.
  • responseBody - Response body from the 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 the GitLab instance.
  • Verify that the API key has sufficient permissions to delete package protection rules in the project.
  • 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 project or rule ID does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion