GitLab API

GitlabTool

Actions905

Overview

This node operation allows users to add entries to the job token scope allowlist for a specific project in GitLab via the GitLab API. It is useful for managing CI/CD job token permissions by specifying which projects or groups are allowed to use job tokens with the target project. For example, a DevOps engineer can automate the process of updating the allowlist to control job token access programmatically.

Use Case Examples

  1. Automate adding projects to the job token scope allowlist to control CI/CD job token permissions.
  2. Integrate with GitLab API to manage job token allowlist entries as part of a deployment pipeline.

Properties

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

Output

JSON

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

Dependencies

  • Requires GitLab API key credential for authentication.

Troubleshooting

  • Ensure the project ID path parameter is correctly provided and is a valid integer.
  • Verify that the authentication credentials (GitLab API key) are correctly configured and have sufficient permissions.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common errors include 401 Unauthorized (authentication issues), 404 Not Found (invalid project ID), and 400 Bad Request (invalid request body).

Links

Discussion