GitLab API icon

GitLab API

Gitlab

Actions880

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 environments up to date.
  2. Automating environment cleanup in CI/CD pipelines by removing environments that are no longer needed.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process 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 URL path to identify the project and environment to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response.
  • body - Response body from the GitLab API after attempting to delete the environment.

Dependencies

  • GitLab API authentication token or credentials

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 in the project.
  • Check the base URL to confirm it points to the correct GitLab instance if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the project or environment does not exist, and 403 Forbidden if the authentication lacks necessary permissions.

Links

Discussion