GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific environment within a GitLab project using the GitLab API. It is useful for automating the removal of environments associated with projects, such as cleaning up old or unused environments programmatically.

Use Case Examples

  1. Deleting an environment by specifying the project ID and environment ID to keep the project clean.
  2. Automating environment management in CI/CD pipelines by removing environments that are no longer needed.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to DELETE for this operation.
Path Parameters Parameters required in the request path to identify the project and environment to delete.

Output

JSON

  • success - Indicates whether the environment was successfully deleted.
  • statusCode - HTTP status code returned by the API.
  • message - Additional message or error information from the API response.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID and environment ID are correct and exist in the GitLab instance.
  • Verify that the authentication token has sufficient permissions to delete environments.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the project or environment does not exist, and 403 Forbidden if the authentication token lacks delete permissions.

Links

Discussion