개인 액세스 토큰 생성 요청
개인 액세스 토큰 생성 요청 (createAccessTokenRequest)
Docker Hub 개인 액세스 토큰을 생성할 때 보내는 요청 스키마예요. 권한 범위(scopes)와 토큰 라벨(token_label)을 지정하고, 선택적으로 만료 시각(expires_at)을 정할 수 있어요.
출처: 문서
본문
요청 본문 필드는 다음과 같아요.
expires_at: (선택) 토큰 만료 시각. 생략하면 토큰은 무기한 유효해요.scopes: 권한 범위 배열. 유효 값은repo:admin,repo:write,repo:read,repo:public_read예요.token_label: 토큰을 식별할 친근한 이름 (1~100자)
{
"examples": [
{
"scopes": [
"repo:read"
],
"token_label": "My read only token"
}
],
"properties": {
"expires_at": {
"description": "Optional expiration date for the token.\nIf omitted, the token will remain valid indefinitely.\n",
"example": "2021-10-28T18:30:19.520861Z",
"format": "date-time",
"type": "string"
},
"scopes": {
"description": "Valid scopes: \"repo:admin\", \"repo:write\", \"repo:read\", \"repo:public_read\"\n",
"example": [
"repo:read"
],
"items": {
"type": "string"
},
"type": "array"
},
"token_label": {
"description": "Friendly name for you to identify the token.",
"example": "My read only token",
"maxLength": 100,
"minLength": 1,
"type": "string"
}
},
"type": "object"
}
더 알아보기
- 액세스 토큰 (accessToken): 생성 결과 토큰 객체를 확인해요.
- 개인 액세스 토큰 생성 작업: 이 요청을 보내는 API 호출을 살펴봐요.