Update a user Run in API Explorer

PUT /v2/scim/2.0/Users/{id}

Updates a user. This route is used to change the user's name, activate, and deactivate the user.

Path parameters

  • id string Required

    The user ID.

application/scim+json

Body Required

  • schemas array[string] Required
  • name object
    Hide name attributes Show name attributes object
    • givenName string
    • familyName string
  • enabled boolean

    If this is omitted from the request, it will default to false resulting in a deactivated user.

    Default value is false.

Responses

  • 200 application/scim+json
    Hide response attributes Show response attributes object
    • schemas array[string]
    • id string

      The unique identifier for the user. A v4 UUID.

    • userName string

      The user's email address. This must be reachable via email.

    • name object
      Hide name attributes Show name attributes object
      • givenName string
      • familyName string
    • displayName string

      The username in Docker. Also known as the "Docker ID".

    • active boolean
    • emails array[object]
      Hide emails attributes Show emails attributes object
      • value string
      • display string
      • primary boolean
    • groups array[object]
      Hide groups attributes Show groups attributes object
      • value string
      • display string
    • meta object
      Hide meta attributes Show meta attributes object
      • resourceType string
      • location string
      • created string(date-time)

        The creation date for the user as a RFC3339 formatted string.

      • lastModified string(date-time)

        The date the user was last modified as a RFC3339 formatted string.

  • 400 application/scim+json

    Bad Request

    Hide response attributes Show response attributes object
    • status string

      The status code for the response in string format.

    • schemas array[string]

      Default value is urn:ietf:params:scim:api:messages:2.0:Error.

    • detail string

      Details about why the request failed.

    • scimType string

      Some types of errors will return this per the specification.

  • 401 application/scim+json

    Unauthorized

    Hide response attributes Show response attributes object
    • status string

      The status code for the response in string format.

    • schemas array[string]

      Default value is urn:ietf:params:scim:api:messages:2.0:Error.

    • detail string

      Details about why the request failed.

  • 403 application/scim+json

    Forbidden

    Hide response attributes Show response attributes object
    • status string

      The status code for the response in string format.

    • schemas array[string]

      Default value is urn:ietf:params:scim:api:messages:2.0:Error.

    • detail string

      Details about why the request failed.

  • 404 application/scim+json

    Not Found

    Hide response attributes Show response attributes object
    • status string

      The status code for the response in string format.

    • schemas array[string]

      Default value is urn:ietf:params:scim:api:messages:2.0:Error.

    • detail string

      Details about why the request failed.

  • 409 application/scim+json

    Conflict

    Hide response attributes Show response attributes object
    • status string

      The status code for the response in string format.

    • schemas array[string]

      Default value is urn:ietf:params:scim:api:messages:2.0:Error.

    • detail string

      Details about why the request failed.

  • 500 application/scim+json

    Internal Error

    Hide response attributes Show response attributes object
    • status string

      The status code for the response in string format.

    • schemas array[string]

      Default value is urn:ietf:params:scim:api:messages:2.0:Error.

    • detail string

      Details about why the request failed.

PUT /v2/scim/2.0/Users/{id}
curl \
 --request PUT 'https://hub.docker.com/v2/scim/2.0/Users/d80f7c79-7730-49d8-9a41-7c42fb622d9c' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/scim+json"
Request examples
{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "name": {
    "givenName": "Jon",
    "familyName": "Snow"
  },
  "enabled": false
}
Response examples (200)
{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "id": "d80f7c79-7730-49d8-9a41-7c42fb622d9c",
  "userName": "jon.snow@docker.com",
  "name": {
    "givenName": "Jon",
    "familyName": "Snow"
  },
  "displayName": "jonsnow",
  "active": true,
  "emails": [
    {
      "value": "jon.snow@docker.com",
      "display": "jon.snow@docker.com",
      "primary": true
    }
  ],
  "groups": [
    {
      "value": "nightswatch",
      "display": "nightswatch"
    }
  ],
  "meta": {
    "resourceType": "User",
    "location": "https://hub.docker.com/v2/scim/2.0/Users/d80f7c79-7730-49d8-9a41-7c42fb622d9c",
    "created": "2022-05-20T00:54:18Z",
    "lastModified": "2022-05-20T00:54:18Z"
  }
}
Response examples (400)
{
  "status": "400",
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "detail": "string",
  "scimType": "string"
}
Response examples (401)
{
  "status": "401",
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "detail": "string"
}
Response examples (403)
{
  "status": "403",
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "detail": "string"
}
Response examples (404)
{
  "status": "404",
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "detail": "string"
}
Response examples (409)
{
  "status": "409",
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "detail": "string"
}
Response examples (500)
{
  "status": "500",
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "detail": "string"
}