GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the package protection rules for a specific project in GitLab using the GitLab API v4. It is useful for users who want to programmatically access the package protection settings of their GitLab projects, for example, to audit or manage package access controls.

Use Case Examples

  1. A DevOps engineer uses this node to fetch package protection rules for a project to verify compliance with organizational policies.
  2. A developer automates the retrieval of package protection rules to integrate with a custom dashboard showing project security settings.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using 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 to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Path Parameters The path parameters for the API request, specifically the project ID or URL-encoded path required to identify the project whose package protection rules are being retrieved.

Output

JSON

  • id - The ID of the package protection rule.
  • name - The name of the package protection rule.
  • created_at - Timestamp when the rule was created.
  • updated_at - Timestamp when the rule was last updated.
  • project_id - The ID of the project to which the rule applies.
  • package_type - The type of package the rule protects.
  • access_level - The access level required to use the package.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correctly provided in the path parameters; otherwise, the API request will fail.
  • If authentication is enabled, verify that the GitLab API key credential is valid and has sufficient permissions to access the project's package protection rules.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct and accessible.
  • Common error messages include 404 Not Found if the project does not exist or the user lacks access, and 401 Unauthorized if authentication fails.

Links

Discussion