GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the job token scope groups allowlist for a specific project in GitLab using the GitLab API. It is useful for automating the management and inspection of group allowlists that control which groups can be accessed by job tokens within a project. For example, it can be used in CI/CD pipelines to verify or audit group permissions programmatically.

Use Case Examples

  1. Fetch the allowlist groups for project ID 123 to check which groups are permitted for job token scope.
  2. Automate the retrieval of job token scope groups allowlist to integrate with security compliance workflows.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Query Parameters Optional query parameters for pagination: 'page' for the current page number and 'per_page' for the number of items per page.
Path Parameters Path parameter 'id' specifying the project ID for which the job token scope groups allowlist is retrieved.

Output

JSON

  • groupsAllowlist - The list of groups allowed for job token scope in the specified project.
  • pagination
    • page - Current page number of the results.
    • per_page - Number of items per page in the results.
    • total - Total number of items available.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID ('id') path parameter is correctly set and corresponds to an existing project in GitLab.
  • Verify that the API key credential has sufficient permissions to access the project's job token scope groups allowlist.
  • Check the baseUrl is correctly set if using a self-hosted GitLab instance instead of gitlab.com.
  • If pagination parameters ('page' and 'per_page') are used, ensure they are valid integers to avoid request errors.

Links

Discussion