GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to retrieve the list of allowed agents for a job via the API endpoint `/api/v4/job/allowed_agents`. It supports making HTTP requests with customizable methods (GET, POST, PUT, DELETE, HEAD, PATCH) to this endpoint, primarily used to fetch information about agents permitted to run a specific job in GitLab CI/CD pipelines.

Use Case Examples

  1. A DevOps engineer uses this node to programmatically check which agents are allowed to run a particular job in their GitLab CI/CD pipeline, helping automate deployment workflows.
  2. A developer integrates this node in an automation workflow to dynamically fetch and verify allowed job agents before triggering job executions.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request. If true, the request is made without authentication.
Authentication Specifies the authentication method to use for the API request, defaulting to GitLab API key authentication. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance to which the API request is sent. Defaults to https://gitlab.com.
Method The HTTP method used for the API request to the `/api/v4/job/allowed_agents` endpoint.

Output

JSON

  • response - The JSON response from the GitLab API containing the allowed agents for the job.

Dependencies

  • GitLab API key credential for authentication unless Skip Authentication is enabled.

Troubleshooting

  • If authentication fails, ensure the GitLab API key credential is correctly configured and has sufficient permissions.
  • If the API request returns an error, verify the baseUrl is correct and the endpoint `/api/v4/job/allowed_agents` is accessible.
  • Ensure the HTTP method selected is appropriate for the operation; typically, GET is used to retrieve allowed agents.

Links

Discussion