GitLab API

GitlabTool

Actions905

Overview

This node operation allows updating the job token scope settings for a specific project in GitLab via the GitLab API. It is useful for managing CI/CD job token permissions programmatically, such as enabling or restricting job token access for a project. For example, a DevOps engineer might use this node to automate the configuration of job token scopes across multiple projects to enforce security policies.

Use Case Examples

  1. Updating the job token scope of a project to restrict job token access.
  2. Automating the configuration of job token permissions for multiple GitLab projects.

Properties

Name Meaning
Skip Authentication Determines whether to skip 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 request is sent.
Method The HTTP method used for the API request, defaulting to GET but PATCH is used for this operation.
Path Parameters Parameters included in the API request path, specifically the project ID for this operation.

Output

JSON

  • response - The JSON response from the GitLab API after updating the job token scope for the specified project.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is valid and the user has permission to update the project settings.
  • Verify that the GitLab API key credential is correctly configured and has sufficient permissions to perform the PATCH operation.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion