GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to add entries to the job token scope allowlist for a specific project in GitLab. It is useful for managing which projects or entities are permitted to use job tokens within a given project, enhancing security and control over CI/CD pipelines. For example, a user can specify a project ID and provide the necessary allowlist details to restrict job token usage to trusted projects only.

Use Case Examples

  1. Adding a project to the job token scope allowlist to enable secure CI/CD job token usage.
  2. Managing job token permissions for a project by updating the allowlist via the GitLab API.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, default is GET but can be POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to be included in the request path, specifically the project ID to identify the target project.

Output

JSON

  • response - The JSON response from the GitLab API after adding to the job token scope allowlist.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID provided in the path parameters is valid and accessible with the provided authentication.
  • Verify that the request body schema matches the expected format for the job token scope allowlist as per GitLab API documentation.
  • Check network connectivity and base URL correctness if the API request fails to reach the GitLab server.
  • Authentication errors may occur if the API token is missing, expired, or lacks sufficient permissions.

Links

Discussion