GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation deletes a specific CI variable in the GitLab instance by its key. It is useful for administrators who want to manage CI/CD variables programmatically, such as removing outdated or sensitive variables from the GitLab CI environment.

Use Case Examples

  1. An admin wants to delete a CI variable named 'API_TOKEN' from the GitLab instance to revoke access.
  2. Automating cleanup of CI variables that are no longer needed after a deployment.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl 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 whether the deletion was successful
  • statusCode - HTTP status code returned by the GitLab API
  • message - Additional message or error details from the API response

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the 'key' parameter is correctly set to the exact 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 the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common errors include 404 Not Found if the variable key does not exist, or 401 Unauthorized if authentication fails.

Links

Discussion