Get access token
GET
/v2/orgs/{org_name}/access-tokens/{access_token_id} Get details of a specific access token for an organization.
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
org_name
path
Required
Name of the organization (namespace).
Type:
string
All schema constraints and annotations
{
"type": "string"
}access_token_id
path
Required
The ID of the access token to retrieve
Type:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Response
200
OK
application/json
Schema:
getOrgAccessTokenResponse
Schema example
{
"created_at": "2022-05-20T00:54:18Z",
"created_by": "johndoe",
"expires_at": "2023-05-20T00:54:18Z",
"id": "a7a5ef25-8889-43a0-8cc7-f2a94268e861",
"is_active": true,
"label": "My organization token",
"last_used_at": "2022-06-15T12:30:45Z",
"resources": [
{
"path": "myorg/myrepo",
"scopes": [
"scope-image-pull"
],
"type": "TYPE_REPO"
}
]
}Response
401
Unauthorized
application/json
Schema:
error
error
{
"errinfo": null,
"message": "unauthorized"
}Response
403
Forbidden
application/json
Schema:
error
error
{
"errinfo": null,
"message": "permission denied"
}Response
404
Not Found
application/json
Schema:
error
error
{
"errinfo": null,
"message": "not found"
}Referenced schemas
#/components/schemas/getOrgAccessTokenResponse
Complete operation contract
{
"description": "Get details of a specific access token for an organization.\n",
"operationId": "getV2OrgsByOrgNameAccessTokensByAccessTokenId",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/getOrgAccessTokenResponse"
}
}
},
"description": "OK"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"bearerAuth": []
}
],
"summary": "Get access token",
"tags": [
"org-access-tokens"
]
}