GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific CI variable from a GitLab group using the GitLab API. It is useful for managing CI/CD variables by removing those that are no longer needed or should be revoked for security reasons. For example, a user can delete a sensitive API key variable from a group to prevent its further use.

Use Case Examples

  1. Deleting a CI variable named 'API_KEY' from a GitLab group with ID '12345' to revoke access.
  2. Removing an outdated environment variable from a project's group to clean up configuration.

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 required in the URL path to identify the group and variable to delete, specifically 'id' for the group ID or path and 'key' for the variable key.

Output

JSON

  • success - Indicates if the variable was successfully deleted (true/false).
  • statusCode - HTTP status code returned by the API after the delete request.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the 'id' and 'key' path parameters are correctly set; missing or incorrect values will cause the API call to fail.
  • Authentication errors may occur if the GitLab API key is invalid or missing; verify credentials.
  • The node may throw errors if the GitLab instance URL is incorrect or unreachable; check the 'baseUrl' property.

Links

Discussion