GitLab API icon

GitLab API

Gitlab

Actions880

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 CI/CD variable named 'API_KEY' from a project with ID '12345' to revoke access.
  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.
Authentication Type of authentication used, defaulting to GitLab API key.
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 relevant here.
Query Parameters Optional query parameters for the request, including environment scope filter.
Path Parameters Path parameters specifying the project ID and variable key to delete.

Output

JSON

  • success - Indicates if the variable was successfully deleted
  • statusCode - HTTP status code of the delete operation response
  • message - Additional message or error information from the API response

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and variable key are correct and exist in the GitLab project.
  • Verify that the API key has sufficient permissions to delete project variables.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the variable or project does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion