GitLab API icon

GitLab API

Gitlab

Actions917

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 protection rules programmatically, such as modifying access controls or restrictions on container registry repositories within a project. For example, a DevOps engineer can automate the update of protection rules to enforce 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 protection rule to restrict or allow certain users or groups from pushing to the container registry.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, default is GET but PATCH is used for this operation.
Path Parameters Parameters included in the request path to identify the project and the specific protection rule to update.

Output

JSON

  • response - The JSON response from the GitLab API after updating the protection rule, containing details of the updated rule.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and protection rule ID are correct and exist in GitLab to avoid 404 errors.
  • Verify that the API token used has sufficient permissions to update container registry protection rules.
  • Check the request body schema matches the expected structure for updating the protection rule to avoid validation errors.

Links

Discussion