GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific environment from a project in GitLab using the GitLab API. It is useful for managing project environments by removing those that are no longer needed or relevant. For example, a user can delete a staging or testing environment from a project to keep the environment list clean and up to date.

Use Case Examples

  1. Deleting an environment with ID 123 from a project with ID 'my-project' to clean up unused environments.
  2. Removing a deprecated environment from a project to prevent accidental deployments.

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, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to DELETE for this operation.
Path Parameters The path parameters required for the API request, including the project ID and the environment ID to delete.

Output

JSON

  • success - Indicates whether the environment was successfully deleted.
  • statusCode - HTTP status code returned by the API after the delete request.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and environment ID are correct and exist in the GitLab instance.
  • Check that the API key used has sufficient permissions to delete environments in the project.
  • If skipping authentication, the request will likely fail unless the GitLab instance allows unauthenticated deletes, which is uncommon.

Links

Discussion