List access tokens
GET
/v2/orgs/{name}/access-tokens List access tokens 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
page
query
Page number to return.
Type:
number
All schema constraints and annotations
{
"default": 1,
"type": "number"
}page_size
query
Number of results per page.
Type:
number
All schema constraints and annotations
{
"default": 10,
"type": "number"
}Request and responses
Response
200
OK
application/json
Schema:
getOrgAccessTokensResponse
Schema example
{
"next": null,
"previous": null,
"results": [
{
"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"
}
],
"total": 1
}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/getOrgAccessTokensResponse
Complete operation contract
{
"description": "List access tokens for an organization.\n",
"operationId": "getV2OrgsByNameAccessTokens",
"parameters": [
{
"description": "Page number to return.",
"in": "query",
"name": "page",
"schema": {
"default": 1,
"type": "number"
}
},
{
"description": "Number of results per page.",
"in": "query",
"name": "page_size",
"schema": {
"default": 10,
"type": "number"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/getOrgAccessTokensResponse"
}
}
},
"description": "OK"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"bearerAuth": []
}
],
"summary": "List access tokens",
"tags": [
"org-access-tokens"
]
}