GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation deletes a specific access token from a GitLab project using the GitLab API. It is useful for managing project access tokens by removing tokens that are no longer needed or should be revoked for security reasons. For example, a user can delete an access token by specifying the project ID and the token ID to ensure that the token can no longer be used to access the project.

Use Case Examples

  1. Deleting an access token from a project to revoke access.
  2. Automating the cleanup of old or unused project access tokens.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API authentication.
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 here it is DELETE for this operation.
Path Parameters The path parameters required for the API call, specifically the project ID and the token ID to identify which access token to delete.

Output

JSON

  • statusCode - The HTTP status code returned by the API after attempting to delete the access token.
  • responseBody - The body of the response from the API, typically empty for a successful delete operation.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID and token ID are correct and exist in the GitLab instance.
  • Verify that the authentication token has sufficient permissions to delete project access tokens.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project or token does not exist, and 403 Forbidden if the authentication token lacks permissions.

Links

Discussion