GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves details of a specific deployment within a GitLab project using the GitLab API. It is useful for scenarios where you need to fetch deployment information such as status, environment, or timestamps for a given project and deployment ID. For example, it can be used in CI/CD pipelines to monitor deployment progress or in dashboards to display deployment history.

Use Case Examples

  1. Fetch deployment details for project ID '123' and deployment ID '456' to monitor deployment status.
  2. Retrieve deployment information to trigger notifications based on deployment success or failure.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using 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 to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET.
Path Parameters The path parameters required for the API endpoint, including the project ID and deployment ID to specify which deployment to retrieve.

Output

JSON

  • id - The unique identifier of the deployment.
  • iid - Internal ID of the deployment within the project.
  • ref - The Git reference (branch or tag) associated with the deployment.
  • sha - The commit SHA associated with the deployment.
  • created_at - Timestamp when the deployment was created.
  • updated_at - Timestamp when the deployment was last updated.
  • status - Current status of the deployment (e.g., success, failed, running).
  • environment - The environment to which the deployment was made (e.g., production, staging).
  • user - Information about the user who triggered the deployment.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and deployment ID are correct and exist in the GitLab instance.
  • Verify that the API key credential has sufficient permissions to access deployment information.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access to deployment data, which is uncommon.
  • Common error messages include 404 Not Found if the project or deployment ID is invalid, and 401 Unauthorized if authentication fails.

Links

Discussion