GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a personal access token in GitLab by its ID. It is useful for managing and revoking access tokens programmatically, for example, when you want to automate token cleanup or enforce security policies by removing tokens that are no longer needed or compromised.

Use Case Examples

  1. Automate deletion of expired or unused personal access tokens in GitLab.
  2. Revoke a specific personal access token by its ID as part of a security workflow.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to GET but set to DELETE for this operation.
Path Parameters The path parameters for the request, specifically the ID of the personal access token to delete.

Output

JSON

  • statusCode - The HTTP status code returned by the API after attempting to delete the personal access token.
  • responseBody - The body of the response from the API, which may contain confirmation or error details.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the personal access token ID provided is valid and exists; otherwise, the API will return an error indicating the token was not found.
  • Check that the GitLab API key credential has sufficient permissions to delete personal access tokens.
  • If skipping authentication, the request will likely fail due to lack of authorization.
  • Verify the base URL is correct for your GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion