GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific CI variable in GitLab by its key. It is useful for automating the management of CI/CD variables in GitLab projects or groups, such as removing outdated or sensitive variables programmatically.

Use Case Examples

  1. Deleting a CI variable named 'API_TOKEN' from GitLab to revoke access.
  2. Automating cleanup of CI variables during project decommissioning.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters to be included in the request path, specifically the 'key' of the CI variable to delete.

Output

JSON

  • success - Indicates if the deletion was successful
  • statusCode - HTTP status code returned from the API
  • message - Additional message or error information from the API response

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the 'key' path parameter is correctly set to the CI variable key to delete, otherwise the API will return an error.
  • If authentication is skipped, the request may fail due to lack of permissions.
  • Check that the baseUrl is correct for your GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the variable key does not exist, or 401 Unauthorized if authentication fails.

Links

Discussion