Update organization settings Run in API Explorer

PUT /v2/orgs/{name}/settings

Updates an organization's settings. Some settings are only used when the organization is on a business subscription.

Only users with administrative privileges for the organization (owner role) can modify these settings.

The following settings are only used on a business subscription:

  • restricted_images

Path parameters

  • name string Required

    Name of the organization.

application/json

Body Required

  • restricted_images object Required
    Hide restricted_images attributes Show restricted_images attributes object
    • enabled boolean Required

      Whether or not to restrict image usage for users in the organization.

    • allow_official_images boolean Required

      Allow usage of official images if "enabled" is true.

    • allow_verified_publishers boolean Required

      Allow usage of verified publisher images if "enabled" is true.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • restricted_images object
      Hide restricted_images attributes Show restricted_images attributes object
      • enabled boolean

        Whether or not to restrict image usage for users in the organization.

      • allow_official_images boolean

        Allow usage of official images if "enabled" is true.

      • allow_verified_publishers boolean

        Allow usage of verified publisher images if "enabled" is true.

  • 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
PUT /v2/orgs/{name}/settings
curl \
 --request PUT 'https://hub.docker.com/v2/orgs/{name}/settings' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"restricted_images":{"enabled":true,"allow_official_images":true,"allow_verified_publishers":true}}'
Request examples
{
  "restricted_images": {
    "enabled": true,
    "allow_official_images": true,
    "allow_verified_publishers": true
  }
}
Response examples (200)
{
  "restricted_images": {
    "enabled": true,
    "allow_official_images": true,
    "allow_verified_publishers": true
  }
}
Response examples (401)
{
  "detail": "string",
  "message": "string"
}
Response examples (403)
{
  "detail": "string",
  "message": "string"
}
Response examples (404)
{
  "detail": "string",
  "message": "string"
}