GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific project access token in GitLab using the GitLab API. It is useful for managing project access tokens by removing tokens that are no longer needed or have been compromised, thereby enhancing project security. For example, a user can delete an access token by specifying the project ID and the token ID to revoke access immediately.

Use Case Examples

  1. Deleting a project access token to revoke access for a user or automation.
  2. Removing an expired or compromised token to maintain project security.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but DELETE is used for this operation.
Path Parameters Parameters required in the URL path to identify the project and the token to delete.

Output

JSON

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

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and token ID are correct and exist in GitLab; otherwise, the API will return an error.
  • Authentication errors may occur if the API key is missing, invalid, or lacks sufficient permissions to delete project access tokens.
  • Network or base URL misconfiguration can cause request failures; verify the baseUrl is correct for your GitLab instance.

Links

Discussion