GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes the authenticated user's personal access token in GitLab via the GitLab API. It is useful for users who want to revoke their own personal access token programmatically, for example, to enhance security by invalidating tokens that are no longer needed or have been compromised.

Use Case Examples

  1. A user automates the revocation of their personal access token after completing a CI/CD pipeline to ensure the token cannot be reused.
  2. An admin script that removes personal access tokens for users who have left the organization, triggered by a workflow.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip 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 here it is DELETE for this operation.
Parameter Schema Hidden property for the parameter schema of the request, not user-configurable.
Request Body Schema Hidden property for the request body schema, not user-configurable.
Request Path The API endpoint path for deleting the personal access token of the authenticated user, fixed to /api/v4/personal_access_tokens/self.

Output

JSON

  • success - Indicates whether the personal access token was successfully deleted.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • If authentication is skipped or invalid, the API request will fail with an authentication error. Ensure the GitLab API credential is correctly configured unless skipping authentication is intentional.
  • If the baseUrl is incorrect or the GitLab instance is unreachable, the request will fail. Verify the baseUrl is correct and the server is accessible.
  • If the personal access token is already deleted or invalid, the API may return a 404 or similar error indicating the token does not exist or cannot be found.

Links

Discussion