GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves pipelines for a specific project from the GitLab API (v4). It allows users to fetch detailed pipeline information by specifying the project ID or URL-encoded path and supports various query parameters to filter and sort the pipelines. This is useful for DevOps teams and developers who want to monitor CI/CD pipeline statuses, filter pipelines by status, scope, or other attributes, and integrate pipeline data into their workflows.

Use Case Examples

  1. Fetch all pipelines for project ID 11.
  2. Retrieve pipelines filtered by status 'pending' and scope 'running'.
  3. Get pipelines updated after a specific date for a project.

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.
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.
Parameter Schema Defines the path and query parameters for the API call, including project ID, pagination, filtering by scope, status, ref, sha, username, date filters, ordering, and source of pipelines.
Query Parameters Collection of optional query parameters to filter and paginate the pipeline results, such as page number, items per page, scope, status, ref, sha, yaml errors, username, updated before/after, order by, sort, source, and name.
Path Parameters Collection containing the project ID or URL-encoded path to identify the project for which pipelines are retrieved.

Output

JSON

  • id - The unique identifier of the pipeline.
  • status - The current status of the pipeline (e.g., running, pending, success).
  • ref - The Git reference (branch or tag) associated with the pipeline.
  • sha - The commit SHA the pipeline is associated with.
  • updated_at - Timestamp when the pipeline was last updated.
  • user
    • username - Username of the user who triggered the pipeline.
  • source - Source of the pipeline trigger (e.g., push, web, schedule).
  • name - Name of the pipeline, if applicable.

Dependencies

  • Requires GitLab API key credential for authentication unless skipping authentication.

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access project pipelines.
  • Check that query parameters are correctly formatted, especially date-time fields in ISO 8601 format.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access to pipelines, otherwise requests will fail.

Links

Discussion