diff options
Diffstat (limited to 'doc/api/group_access_tokens.md')
-rw-r--r-- | doc/api/group_access_tokens.md | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/api/group_access_tokens.md b/doc/api/group_access_tokens.md index 18469741814..621b3241de2 100644 --- a/doc/api/group_access_tokens.md +++ b/doc/api/group_access_tokens.md @@ -1,7 +1,7 @@ --- stage: Govern group: Authentication -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- # Group access tokens API **(FREE ALL)** @@ -130,14 +130,17 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \ Rotate a group access token. Revokes the previous token and creates a new token that expires in one week. +In GitLab 16.6 and later, you can use the `expires_at` parameter to set a different expiry date. This non-default expiry date can be up to a maximum of one year from the rotation date. + ```plaintext POST /groups/:id/access_tokens/:token_id/rotate ``` -| Attribute | Type | required | Description | -|-----------|---------|----------|---------------------| -| `id` | integer or string | yes | ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | -| `token_id` | integer or string | yes | ID of the project access token | +| Attribute | Type | required | Description | +|-----------|------------|----------|---------------------| +| `id` | integer/string | yes | ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) | +| `token_id` | integer/string | yes | ID of the access token | +| `expires_at` | date | no | Expiration date of the access token in ISO format (`YYYY-MM-DD`). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/416795) in GitLab 16.6. | ```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/<group_id>/access_tokens/<token_id>/rotate" |