GitLab API icon

GitLab API

Gitlab

Actions880

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, a user can fetch jobs filtered by status, order, or pagination to analyze runner activity or troubleshoot job executions.

Use Case Examples

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

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters to filter and paginate the jobs.
Path Parameters Path parameter specifying the runner ID to fetch jobs for.

Output

JSON

  • id - Unique identifier of the job.
  • status - Current status of the job.
  • runner_id - ID of the runner executing 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.
  • user - User who triggered the job.
  • pipeline - Pipeline associated with the job.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the runner ID provided in the path parameter is valid and exists in the GitLab instance.
  • Verify that the authentication credentials are correctly configured unless skipping authentication is enabled.
  • Check that query parameters like status and pagination values are valid and supported by the GitLab API.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid runner ID), and 400 Bad Request (invalid query parameters). Resolving these involves correcting credentials, verifying runner ID, and adjusting query parameters respectively.

Links

Discussion