List access tokens Run in API Explorer

GET /v2/orgs/{name}/access-tokens

List access tokens for an organization.

Query parameters

  • page number

    Default value is 1.

  • page_size number

    Default value is 10.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • total number
    • next string
    • previous string
    • results array[object]
      Hide results attributes Show results attributes object
      • id string
      • label string
      • created_by string
      • is_active boolean
      • created_at string(date-time)
      • expires_at string(date-time) | null
      • last_used_at string(date-time) | null
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • detail string
    • message string
  • 403 application/json

    Forbidden

    Hide response attributes Show response attributes object
    • detail string
    • message string
  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • detail string
    • message string
GET /v2/orgs/{name}/access-tokens
curl \
 --request GET 'https://hub.docker.com/v2/orgs/{name}/access-tokens' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "total": 10,
  "next": "https://hub.docker.com/v2/orgs/docker/access-tokens?page=2&page_size=10",
  "previous": "https://hub.docker.com/v2/orgs/docker/access-tokens?page=1&page_size=10",
  "results": [
    {
      "id": "a7a5ef25-8889-43a0-8cc7-f2a94268e861",
      "label": "My organization token",
      "created_by": "johndoe",
      "is_active": true,
      "created_at": "2022-05-20T00:54:18Z",
      "expires_at": "2023-05-20T00:54:18Z",
      "last_used_at": "2022-06-15T12:30:45Z"
    }
  ]
}
Response examples (401)
{
  "detail": "string",
  "message": "string"
}
Response examples (403)
{
  "detail": "string",
  "message": "string"
}
Response examples (404)
{
  "detail": "string",
  "message": "string"
}