GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the list of runners associated with a specific GitLab project using the GitLab API v4. It is useful for DevOps teams and developers who want to manage or monitor the runners assigned to their projects, filtering them by various criteria such as type, status, tags, and version. For example, it can be used to fetch all active runners for a project or to find runners with specific tags for job execution.

Use Case Examples

  1. Fetch all runners for a project by project ID.
  2. Filter runners by type (instance, group, or project) to see specific runner categories.
  3. Retrieve runners that are currently active or paused to monitor runner availability.

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, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to connect to, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional filters and pagination parameters for the runners list, including scope, type, paused status, runner status, tags, version prefix, page number, and items per page.
Path Parameters The project ID or URL-encoded path identifying the project whose runners are to be retrieved.

Output

JSON

  • id - Unique identifier of the runner
  • description - Description of the runner
  • active - Whether the runner is active
  • status - Current status of the runner (e.g., active, paused)
  • tags - List of tags associated with the runner
  • version - Version of the runner software
  • runner_type - Type of the runner (instance, group, project)
  • created_at - Timestamp when the runner was created
  • updated_at - Timestamp when the runner was last updated

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID or path is correct and accessible by the authenticated user to avoid 404 errors.
  • Verify that the API key credential has sufficient permissions to read project runners to prevent authorization errors.
  • Check the base URL if using a self-hosted GitLab instance to avoid connection errors.
  • If filtering by tags or other query parameters, ensure the values are correctly formatted to avoid empty or incorrect results.

Links

Discussion