GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific CI/CD variable from a GitLab project. It is useful for managing project environment variables by removing those that are no longer needed or should be revoked. For example, a user can delete a sensitive variable from a project to enhance security or clean up unused variables.

Use Case Examples

  1. Deleting a variable named 'API_KEY' from a project with ID '12345' to revoke access credentials.
  2. Removing an environment-specific variable from a project to prevent it from being used in certain deployment scopes.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
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 DELETE is used for this operation.
Query Parameters Optional query parameters for the request, including environment scope filter.
Path Parameters Required path parameters including project ID and variable key to identify the variable to delete.

Output

JSON

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

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and variable key are correctly specified; incorrect values will cause the API to fail.
  • Authentication errors may occur if the API token is missing or invalid; verify credentials are properly configured.
  • If the variable is scoped to an environment, ensure the correct environment scope is provided in query parameters if needed.

Links

Discussion