GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific container protection rule from a project's registry in GitLab. It is useful for managing and maintaining container registry security by removing outdated or unnecessary protection rules. For example, a DevOps engineer might use this node to automate the cleanup of container protection rules in a CI/CD pipeline.

Use Case Examples

  1. Delete a container protection rule by specifying the project ID and the protection rule ID to ensure the registry is properly secured.
  2. Automate the removal of container protection rules as part of project decommissioning or security policy updates.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
baseUrl The base URL of the GitLab instance, defaulting to 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 protection rule to delete.

Output

JSON

  • success - Indicates whether the deletion was successful.
  • message - Additional information or error message related to the deletion operation.

Dependencies

  • GitLab API authentication

Troubleshooting

  • Ensure the project ID and protection rule ID are correct and exist in the GitLab instance.
  • Verify that the API token used has sufficient permissions to delete container protection rules.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project or rule does not exist, and 403 Forbidden if the API token lacks permissions.

Links

Discussion