GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves detailed information about a specific pipeline within a GitLab project using the GitLab API v4. It is useful for developers and DevOps engineers who want to monitor or analyze the status and details of CI/CD pipelines in their GitLab projects. For example, it can be used to fetch the status of a pipeline to trigger subsequent automation steps based on success or failure.

Use Case Examples

  1. Fetch pipeline details for project ID 11 and pipeline ID 18 to check the pipeline status before deploying code.
  2. Retrieve pipeline information to log or audit CI/CD pipeline runs in a GitLab project.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication 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 HTTP method used for the API request, default is GET.
Path Parameters Parameters to specify the project ID or URL-encoded path and the pipeline ID to identify the pipeline to retrieve.

Output

JSON

  • id - The unique identifier of the pipeline.
  • status - The current status of the pipeline (e.g., running, success, failed).
  • ref - The branch or tag name the pipeline is associated with.
  • sha - The commit SHA the pipeline is running for.
  • web_url - The URL to view the pipeline in the GitLab web interface.

Dependencies

  • GitLab API key credential

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 information.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access to pipeline details, otherwise the request will fail.

Links

Discussion