GitLab API

GitlabTool

Actions1000

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 scenarios where you need to programmatically access or verify the job token permissions associated with a GitLab project, such as in CI/CD pipeline automation or project security audits.

Use Case Examples

  1. Retrieve the job token scope of a project to check its permissions before running a CI/CD pipeline.
  2. Automate the monitoring of job token scopes across multiple projects to ensure compliance with security policies.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process 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 request is sent.
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 to identify the project whose job token scope is being retrieved.

Output

JSON

  • id - The ID of the project.
  • job_token_scope - The job token scope details for the specified project.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is valid and exists in the GitLab instance.
  • If authentication is not skipped, verify that the GitLab API key credential is correctly configured and has sufficient permissions.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages may include 401 Unauthorized (due to invalid or missing API key), 404 Not Found (if the project ID does not exist), and 400 Bad Request (if the request parameters are malformed).

Links

Discussion