GitLab API

GitlabTool

Actions1095

Personal_access_tokens → postApiV4PersonalAccessTokensIdRotate

AI-generated

Summary

Rotate a personal access token by its ID, submitting required parameters in the request body to generate a new token replacing the old one.

Inputs

  • id (required) — The ID of the personal access token to rotate, supplied as a path parameter.
  • requestBody (required) — The request body containing required fields defined by the 'postApiV4PersonalAccessTokensIdRotate' schema necessary to perform the token rotation.

Output shape

An object representing the newly rotated personal access token returned by the GitLab API.

This operation performs an HTTP POST to the endpoint '/api/v4/personal_access_tokens/{id}/rotate'. The response includes the new token details as per GitLab's API. Authentication is required unless explicitly skipped via 'skipAuthentication'.

Links

Discussion