GitLab API

GitlabTool

Actions905

Overview

This node operation performs a POST request to the GitLab API endpoint /api/v4/personal_access_tokens/self/rotate to rotate the personal access token of the authenticated user. It is useful for users who want to programmatically refresh their personal access tokens to maintain security without manual intervention.

Use Case Examples

  1. Automatically rotate personal access tokens on a schedule to enhance security.
  2. Integrate token rotation into CI/CD pipelines to ensure tokens are always up to date.

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 request is sent, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET but POST is used for this operation.
Parameter Schema Schema defining the parameters for the postApiV4PersonalAccessTokensSelfRotate operation, required in the request body.
Request Body Schema Schema defining the structure of the request body for the operation.
Request Path The API endpoint path for rotating the personal access token, fixed as /api/v4/personal_access_tokens/self/rotate.

Output

JSON

  • response - The JSON response from the GitLab API after rotating the personal access token, typically containing the new token details.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the GitLab API credentials are correctly configured and have the necessary permissions to rotate personal access tokens.
  • If the API returns authentication errors, verify that the baseUrl is correct and accessible.
  • Check that the HTTP method is set to POST for this operation, as other methods will not work.

Links

Discussion