GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the registry protection repository rules for a specific project in GitLab using the GitLab API. It is useful for users who want to programmatically access the repository rules related to container registry protection within a GitLab project. For example, a DevOps engineer might use this node to automate the auditing or management of container registry rules across multiple projects.

Use Case Examples

  1. Retrieve registry protection repository rules for a project with a given project ID to verify compliance with security policies.
  2. Automate fetching of repository rules to integrate with a CI/CD pipeline for dynamic configuration or reporting.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to GET.
Path Parameters The path parameters for the API request, specifically the project ID or URL-encoded path.

Output

JSON

  • response - The JSON response containing the registry protection repository rules for the specified project.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the authenticated user.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access project registry protection rules.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the project ID is invalid or inaccessible, and 401 Unauthorized if authentication fails.

Links

Discussion