조직 설정 수정

조직 설정 수정 (Update organization settings)

Docker Hub API에서 조직 설정을 수정하는 작업이에요. 조직의 관리 권한(owner 역할)이 있는 사용자만 수정할 수 있고, 일부 설정은 비즈니스 구독에서만 사용돼요.

출처: 문서

본문

PUT 요청으로 조직의 설정을 수정합니다. bearerAuth 인증이 필요해요. 조직에 대한 관리 권한(owner 역할)이 있는 사용자만 이 설정을 변경할 수 있어요. 비즈니스 구독에서만 사용되는 설정은 restricted_images예요.

파라미터

파라미터 위치 설명
name path (필수) 조직 이름

요청 본문

restricted_images 필드에 이미지 제한 설정을 담아요. enabled, allow_official_images, allow_verified_publishers가 필수예요.

{
  "restricted_images": {
    "allow_official_images": true,
    "allow_verified_publishers": true,
    "enabled": true
  }
}

응답 200

수정된 설정이 orgSettings로 돌아와요.

{
  "restricted_images": {
    "allow_official_images": true,
    "allow_verified_publishers": true,
    "enabled": true
  }
}

오류 응답

  • 401: 인증 실패 (unauthorized)
  • 403: 권한 없음

예시 요청

curl \
  --request PUT \
  --header "Authorization: Bearer ***" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "restricted_images": {
    "allow_official_images": true,
    "allow_verified_publishers": true,
    "enabled": true
  }
}' \
  'https://hub.docker.com/v2/orgs/<NAME>/settings'

더 알아보기