GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves jobs associated with a specific GitLab runner by its ID. It is useful for monitoring and managing CI/CD jobs executed by runners in GitLab. For example, users can filter jobs by status, order them by ID, paginate results, and specify sorting order to get detailed job information for a runner.

Use Case Examples

  1. Retrieve all jobs for a runner with ID 123, filtering by status 'running' and sorting results in descending order.
  2. Get the second page of jobs for a runner with 20 jobs per page, ordered by job ID.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl 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 Collection of optional query parameters to filter and paginate the jobs list, including system_id, status, order_by, sort, cursor, page, and per_page.
Path Parameters Path parameter specifying the runner ID to retrieve jobs for.

Output

JSON

  • id - Unique identifier of the job
  • status - Current status of the job
  • stage - Stage of the job in the pipeline
  • name - Name of the job
  • ref - Git reference (branch or tag) associated with the job
  • tag - Whether the job is tagged
  • coverage - Code coverage percentage reported by the job
  • created_at - Timestamp when the job was created
  • started_at - Timestamp when the job started
  • finished_at - Timestamp when the job finished
  • duration - Duration of the job execution
  • queued_duration - Time the job spent in the queue
  • user
    • id - ID of the user who triggered the job
    • name - Name of the user who triggered the job
  • runner
    • id - ID of the runner executing the job
    • description - Description of the runner executing the job

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the runner ID path parameter is provided and valid; missing or invalid ID will cause errors.
  • Verify that the GitLab API key credential is correctly configured and has sufficient permissions to access runner jobs.
  • Check network connectivity and base URL correctness if requests fail to reach the GitLab instance.
  • If filtering by status or other query parameters, ensure values are valid as per GitLab API documentation to avoid request errors.

Links

Discussion