GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the list of allowed agents for a job from the GitLab API (version 4). It is useful for scenarios where you need to determine which agents are permitted to run a specific job in a GitLab CI/CD pipeline. For example, it can be used to automate monitoring or management of job execution environments in GitLab.

Use Case Examples

  1. Fetch allowed agents for a specific job to verify job execution permissions.
  2. Integrate with GitLab CI/CD to dynamically adjust job scheduling based on allowed agents.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Parameter Schema Hidden property for the parameter schema of the API request, specific to this operation.
Request Body Schema Hidden property for the request body schema of the API request, specific to this operation.
Request Path The API endpoint path for retrieving allowed agents for a job, fixed to /api/v4/job/allowed_agents.

Output

JSON

  • allowed_agents - List of agents allowed to run the job.
  • statusCode - HTTP status code of the API response.
  • headers - HTTP headers returned by the API response.

Dependencies

  • GitLab API key credential

Troubleshooting

  • If authentication is skipped but the GitLab instance requires authentication, the request will fail with an authorization error. Ensure authentication is enabled if required.
  • Incorrect baseUrl can lead to connection errors or 404 responses. Verify the GitLab instance URL is correct.
  • Using an unsupported HTTP method may cause the API to reject the request. Use GET for this operation as per the default setting.

Links

Discussion