Update personal access token
PATCH
/v2/access-tokens/{uuid} Updates a personal access token partially. You can either update the token's label or enable/disable it.
Connection and access
API connection and authentication guidance
https://hub.docker.com
—
Docker HUB API
Use one of these alternatives. Requirements within an alternative apply together.
bearerAuth
Parameters
uuid
path
Required
UUID of the personal access token.
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Request
application/json
Schema:
patchAccessTokenRequest
Schema example
{
"is_active": false,
"token_label": "My read only token"
}Response
200
OK
application/json
Schema:
patchAccessTokenResponse
Schema example
{
"client_id": "HUB",
"created_at": "2021-07-20T12:00:00.000000Z",
"creator_ip": "127.0.0.1",
"creator_ua": "some user agent",
"expires_at": "2021-10-28T18:30:19.520861Z",
"generated_by": "manual",
"is_active": true,
"last_used": null,
"scopes": [
"repo:read"
],
"token": "***",
"token_label": "My read only token",
"uuid": "b30bbf97-506c-4ecd-aabc-842f3cb484fb"
}Response
400
Bad Request
application/json
Schema:
error
error
{
"errinfo": null,
"message": "bad request"
}Response
401
Unauthorized
application/json
Schema:
error
error
{
"errinfo": null,
"message": "unauthorized"
}Referenced schemas
#/components/schemas/patchAccessTokenRequest
#/components/schemas/patchAccessTokenResponse
Complete operation contract
{
"description": "Updates a personal access token partially. You can either update the token's label or enable/disable it.\n",
"operationId": "patchV2AccessTokensByUuid",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/patchAccessTokenRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/patchAccessTokenResponse"
}
}
},
"description": "OK"
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
}
},
"security": [
{
"bearerAuth": []
}
],
"summary": "Update personal access token",
"tags": [
"access-tokens"
]
}