GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows rotating a personal access token in GitLab by making a POST request to the GitLab API endpoint `/api/v4/personal_access_tokens/{id}/rotate`. It is useful for users who want to securely regenerate their personal access tokens without manually creating new ones, ensuring continued access with updated credentials.

Use Case Examples

  1. A user wants to rotate their existing personal access token to enhance security without disrupting their automated workflows.
  2. An administrator automates token rotation for multiple users to comply with security policies.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication credentials 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 POST for this operation.
Path Parameters Parameters included in the request path, specifically the 'id' of the personal access token to rotate.

Output

JSON

  • id - The ID of the rotated personal access token.
  • token - The new token string generated after rotation.
  • name - The name of the personal access token.
  • scopes - The scopes or permissions assigned to the token.
  • created_at - Timestamp when the token was created.
  • expires_at - Expiration date of the token, if set.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the 'id' path parameter is correctly set to the personal access token ID to avoid 404 errors.
  • Verify that the GitLab API credentials are valid and have sufficient permissions to rotate personal access tokens.
  • If skipping authentication, the request may fail due to lack of authorization.
  • Check the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab server.

Links

Discussion