GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation deletes review app environments for a specified project in GitLab. It is useful for cleaning up temporary or outdated review app environments automatically or manually, helping maintain a tidy project environment and manage resources efficiently. For example, a user can delete all review app environments created before a certain date or limit the number of environments deleted in one operation.

Use Case Examples

  1. Deleting review app environments older than 30 days to free up resources.
  2. Performing a dry run to see which environments would be deleted without actually deleting them.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to DELETE for this operation.
Parameter Schema Defines the parameters for the API call including project ID, date filter, limit on number of deletions, and dry run flag.
Query Parameters Optional query parameters to filter and control the deletion operation, including 'before' date, 'limit' on number of environments to delete, and 'dry_run' to perform a dry run without actual deletion.
Path Parameters Path parameters including the project ID or URL-encoded path of the project owned by the authenticated user.

Output

JSON

  • statusCode - HTTP status code of the API response.
  • body - Response body from the API call, typically indicating success or details of the deletion operation.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID is correct and accessible by the authenticated user to avoid authorization errors.
  • Verify that the 'before' date is in the correct ISO 8601 format to prevent request validation errors.
  • If using dry_run=true, no environments will be deleted; set dry_run to false to perform actual deletions.
  • Check network connectivity and baseUrl correctness if the API call fails to reach the GitLab server.

Links

Discussion