GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to retrieve the job token scope for a specific project by its ID. It is useful for automating workflows that require information about project job token permissions in GitLab, such as CI/CD pipeline configurations or security audits.

Use Case Examples

  1. Retrieve the job token scope of a project to verify permissions for CI jobs.
  2. Automate monitoring of project job token scopes across multiple projects in GitLab.

Properties

Name Meaning
Skip Authentication Option to bypass authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters to be included in the request path, specifically the project ID.

Output

JSON

  • id - The project ID for which the job token scope is retrieved.
  • job_token_scope - The scope of the job token for the specified project, detailing permissions and access.

Dependencies

  • Requires GitLab API key credential for authentication unless Skip Authentication is enabled.

Troubleshooting

  • Ensure the project ID is correctly provided and exists in GitLab to avoid 404 errors.
  • Verify that the GitLab API key has sufficient permissions to access project job token scopes.
  • If Skip Authentication is enabled, ensure the GitLab instance allows unauthenticated access to this endpoint, otherwise requests will fail.

Links

Discussion