GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific variable from a GitLab project using the GitLab API. It is useful for managing project environment variables by removing those that are no longer needed or relevant. For example, a user can delete a sensitive variable from a project to enhance security or clean up outdated configuration settings.

Use Case Examples

  1. Deleting an environment variable from a GitLab project to revoke access credentials.
  2. Removing a project-specific configuration variable that is no longer used.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method for the API request, defaulting to GET but set to DELETE for this operation.
Query Parameters Optional query parameters for the request, including environment scope filter.
Path Parameters Required path parameters identifying the project and variable key to delete.

Output

JSON

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

Dependencies

  • GitLab API key credential for authentication

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 environment scope filter if used, as it may restrict the variable deletion.
  • Common error messages include 404 Not Found if the project or variable does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion