개인 액세스 토큰 조회

개인 액세스 토큰 조회

UUID로 개인 액세스 토큰을 반환해요.

출처: 문서

본문

GET /v2/access-tokens/{uuid}

개인 액세스 토큰 조회 작업이에요. UUID로 개인 액세스 토큰을 반환해요.

요청 예시

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

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

요청과 응답

응답 200 OK

Schema:

{
  "allOf": [
    {
      "$ref": "#/components/schemas/accessToken"
    },
    {
      "properties": {
        "token": {
          "example": "***",
          "type": "string"
        }
      },
      "type": "object"
    }
  ],
  "examples": [
    {
      "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"
    }
  ]
}

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

응답 401 Unauthorized

Schema:

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

error:

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

응답 404 Not Found

Schema:

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

error:

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

전체 작업 계약

{
  "description": "Returns a personal access token by UUID.",
  "operationId": "getV2AccessTokensByUuid",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "allOf": [
              {
                "$ref": "#/components/schemas/accessToken"
              },
              {
                "properties": {
                  "token": {
                    "example": "***",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ],
            "examples": [
              {
                "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"
              }
            ]
          }
        }
      },
      "description": "OK"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "summary": "Get personal access token",
  "tags": [
    "access-tokens"
  ]
}

참조된 스키마

더 알아보기