GitLab API

GitlabTool

Actions1095

Personal_access_tokens → postApiV4PersonalAccessTokensSelfRotate

AI-generated

Summary

Rotate the current user's personal access token by sending a POST request to the '/api/v4/personal_access_tokens/self/rotate' endpoint on a GitLab instance.

Inputs

  • skipAuthentication — Whether to skip using authentication credentials for the request; defaults to false, meaning authentication is used.
  • baseUrl — The base URL of the GitLab instance to send the request to; defaults to 'https://gitlab.com'.

Output shape

a single JSON response object representing the new personal access token details returned by GitLab after rotation

The request uses a POST method targeting the '/api/v4/personal_access_tokens/self/rotate' path. Authentication is used by default unless explicitly skipped. The operation returns the rotated personal access token data as defined by the GitLab API specification.

Links

Discussion