GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation interacts with the GitLab API to retrieve the list of allowed agents for a job via the endpoint `/api/v4/job/allowed_agents`. It supports making HTTP requests with various methods (GET, POST, PUT, DELETE, HEAD, PATCH) to this endpoint, typically used to fetch or manage job-related agent information in GitLab CI/CD pipelines.

Use Case Examples

  1. Fetch allowed agents for a specific job in a GitLab project to determine which agents can run the job.
  2. Use the node to automate CI/CD workflows by dynamically retrieving job agent information from GitLab.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the 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, defaulting to https://gitlab.com.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).

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 skipping authentication

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to access job agent information.
  • Verify the baseUrl is correct and accessible, especially if using a self-hosted GitLab instance.
  • Check the HTTP method is appropriate for the operation; typically, GET is used to retrieve allowed agents.
  • If skipping authentication, ensure the endpoint allows unauthenticated access, otherwise requests will fail with authorization errors.

Links

Discussion