GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to retrieve a list of runners using the API v4 endpoint. It is useful for scenarios where users need to manage or monitor GitLab runners, such as filtering runners by type, status, tags, or version prefix. For example, a DevOps engineer might use this node to fetch all active runners tagged with 'macos' to ensure proper resource allocation.

Use Case Examples

  1. Fetch all active GitLab runners of type 'instance_type'.
  2. Retrieve runners filtered by specific tags like 'macos' and 'shell'.
  3. Paginate through runners with custom page size and number.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request (boolean). Defaults to false.
Authentication The authentication method used for the API request, hidden unless Skip Authentication is false. Defaults to GitlabApi.
baseUrl The base URL of the GitLab instance to send the request to. Defaults to https://gitlab.com.
Method HTTP method to use for the request. Defaults to GET.
Query Parameters Collection of optional query parameters to filter and paginate the runners list.

Output

JSON

  • id - Unique identifier of the runner.
  • description - Description of the runner.
  • active - Boolean indicating if the runner is active.
  • is_shared - Boolean indicating if the runner is shared.
  • status - Current status of the runner.
  • tags - List of tags associated with the runner.
  • version - Version of the runner.
  • runner_type - Type of the runner (instance, group, project).

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the GitLab API token has sufficient permissions to access runner information.
  • Verify the baseUrl is correct and accessible.
  • Check that query parameters are correctly formatted, especially arrays like tag_list.
  • Common error: 401 Unauthorized - indicates authentication failure; verify API token and authentication settings.
  • Common error: 404 Not Found - indicates the API endpoint or resource does not exist; verify the path and baseUrl.

Links

Discussion