GitLab API

GitlabTool

Actions905

Overview

This node operation allows updating a specific container registry protection rule for a project in GitLab via the GitLab API. It is useful for managing repository security settings programmatically, such as modifying access rules for container registries within a project. For example, a DevOps engineer can automate the update of protection rules to enforce new security policies across multiple projects.

Use Case Examples

  1. Updating the access level of a container registry protection rule for a project.
  2. Modifying the scope or conditions of a repository protection rule to comply with organizational security standards.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, defaulting to PATCH for this operation.
Path Parameters Parameters included in the API request path to identify the project and the specific protection rule to update.

Output

JSON

  • response - The JSON response from the GitLab API containing the updated protection rule details.

Dependencies

  • GitLab API credentials for 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 update container registry protection rules.
  • Check the base URL to confirm it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common errors include 404 Not Found if the project or rule ID is invalid, and 403 Forbidden if the API token lacks necessary permissions.

Links

Discussion