GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to approve a specific deployment within a GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/deployments/{deployment_id}/approval`. It is useful in scenarios where automated deployment approval is needed as part of a CI/CD pipeline or workflow automation in GitLab projects.

Use Case Examples

  1. Automatically approve deployments after successful tests in a CI/CD pipeline.
  2. Integrate deployment approval into a larger workflow that manages project releases.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication to use, default is GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to specify the project ID and deployment ID for the approval request.

Output

JSON

  • id - The ID of the approved deployment.
  • status - The status of the deployment after approval.
  • environment - Details about the environment where the deployment occurred.
  • user - Information about the user who approved the deployment.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and deployment ID are correct and accessible by the authenticated user.
  • Verify that the GitLab API key credential has sufficient permissions to approve deployments.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 401 Unauthorized (authentication issues), 404 Not Found (invalid project or deployment ID), and 403 Forbidden (insufficient permissions).

Links

Discussion