GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves jobs for a specific pipeline within a GitLab project using the GitLab API v4. It is useful for users who want to monitor or analyze the status and details of jobs associated with a particular pipeline in their GitLab projects. For example, it can be used to fetch all jobs of a pipeline to check which jobs succeeded, failed, or are still running.

Use Case Examples

  1. Fetch all jobs for pipeline ID 18 in project ID 11 to monitor pipeline execution status.
  2. Retrieve jobs with a specific scope such as 'running' or 'failed' to filter jobs by their current state.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Parameter Schema Defines the path and query parameters for the API request, including project ID, pipeline ID, and optional query filters like include_retried, scope, page, and per_page.
Query Parameters Optional query parameters to filter and paginate the jobs list, such as include_retried, scope, page, and per_page.
Path Parameters Path parameters specifying the project ID and pipeline ID to identify the pipeline whose jobs are being retrieved.

Output

JSON

  • jobs - List of jobs retrieved from the specified pipeline in the GitLab project, including job details such as status, ID, and other metadata.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and pipeline ID are correct and exist in the GitLab instance to avoid 404 errors.
  • Verify that the API key credential has sufficient permissions to access the project and pipeline data.
  • Check network connectivity and base URL configuration if the node cannot reach the GitLab API endpoint.
  • If using query parameters like scope or include_retried, ensure they are valid according to GitLab API documentation to avoid request errors.

Links

Discussion