액세스 토큰 목록 조회

액세스 토큰 목록 조회

조직의 액세스 토큰 목록을 반환해요.

출처: 문서

본문

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

액세스 토큰 목록 조회 작업이에요. 조직의 액세스 토큰 목록을 반환해요.

요청 예시

실행 전에 자리 표시자를 바꾸고 필요 자격 증명이나 요청 바디를 채워야 해요.

curl \
  --request GET \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  'https://hub.docker.com/v2/orgs/{name}/access-tokens'

요청과 응답

응답 200 OK

Schema:

{
  "$ref": "#/components/schemas/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
}

응답 401 Unauthorized

Schema:

{
  "$ref": "#/components/schemas/error"
}

error:

{
  "errinfo": null,
  "message": "unauthorized"
}

응답 403 Forbidden

Schema:

{
  "$ref": "#/components/schemas/error"
}

error:

{
  "errinfo": null,
  "message": "permission denied"
}

응답 404 Not Found

Schema:

{
  "$ref": "#/components/schemas/error"
}

error:

{
  "errinfo": null,
  "message": "not found"
}

전체 작업 계약

{
  "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"
  ]
}

참조된 스키마

더 알아보기