GitLab API

GitlabTool

Actions905

Overview

This node operation deletes the current user's personal access token in GitLab via the GitLab API. It is useful for scenarios where a user wants to revoke their own personal access token programmatically, such as during automated cleanup or security workflows.

Use Case Examples

  1. A user automates the revocation of their personal access token after a certain period for security reasons.
  2. An admin script removes tokens that are no longer needed to maintain security hygiene.

Properties

Name Meaning
Skip Authentication If set to true, the node skips using authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to GET but set to DELETE for this operation.
Parameter Schema Hidden property for the parameter schema of the operation, not user-configurable.
Request Body Schema Hidden property for the request body schema of the operation, not user-configurable.
Request Path The API endpoint path for deleting the personal access token, fixed to /api/v4/personal_access_tokens/self.

Output

JSON

  • statusCode - HTTP status code of the API response indicating success or failure of the token deletion.
  • responseBody - The body of the API response, typically empty or containing confirmation of deletion.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • If authentication is skipped or invalid, the API request will fail with an authentication error. Ensure valid GitLab API credentials are provided unless skipping authentication is intentional.
  • If the baseUrl is incorrect or the GitLab instance is unreachable, the request will fail with a network or connection error. Verify the baseUrl is correct and accessible.
  • If the personal access token is already deleted or invalid, the API may return a 404 or 401 error. Confirm the token exists and the user has permission to delete it.

Links

Discussion