!!! Overview
[{$pagename}] is a [SCIM Resource Operation] to Replace Values on a [SCIM Resource]

%%warning
[HTTP PUT] performs a full update. 
%%

!! Replacing with [HTTP PUT] ([SCIM 2.0] [RFC 7644])
[HTTP PUT] is used to replace a [SCIM Resource]'s attributes.  

For example, [SCIM Clients] that have previously retrieved the entire [SCIM Resource] in advance  and revised it [MAY] replace the [SCIM Resource] using an [HTTP PUT].  

Because [SCIM Resource] identifiers are assigned by the [SCIM Service Provider], __[HTTP PUT] [MUST NOT]__ be used to create new resources.

As the operation's intent is to replace all attributes, [SCIM Clients] [MAY] send all attributes, regardless of each attribute's mutability.  The [SCIM Service Provider] will apply attribute-by-attribute replacements according to the following attribute mutability rules:

!! readWrite, writeOnly  
Any values provided [SHALL] replace the existing attribute values.

Attributes whose mutability is "readWrite" that are omitted from the request body [MAY] be assumed to be not asserted by the [SCIM Client].

The [SCIM Service Provider] [MAY] assume that any existing values are to be cleared, or the service provider [MAY] assign a default value to the final resource representation.  

[Service Provider] [MAY] take into account whether or not a client has access to, or understands, all of the resource's attributes when deciding whether non-asserted attributes [SHALL] be removed or defaulted.  Clients that want to override a [SCIM Service Provider]'s defaults [MAY] specify "null" for a [SINGLE-VALUE] attribute, or an empty array "[[]" for a [MULTI-VALUE] attribute, to clear all values.

!! immutable
If one or more values are already set for the attribute,  the input value(s) [MUST] match, or HTTP status code 400 [SHOULD] be returned with a "scimType" error code of "mutability".  If the service provider has no existing values, the new value(s) [SHALL] be applied.

!! readOnly
Any values provided SHALL be ignored.

!! required
If an attribute is "required", clients [MUST] specify the attribute in the [HTTP PUT] request.

Unless otherwise specified, a successful [HTTP PUT] operation returns a 200 OK response code and the entire resource within the response body, enabling the [SCIM Clients] to correlate the client's and the service provider's views of the updated resource. [SCIM Clients] __[MUST]__ retrieve the entire Resource and [HTTP PUT] the desired modifications as the operation __overwrites all__ previously stored data. 

[{$pagename}] is performed using a URL [endpoint] similar to: 
{{{
PUT https://example.com/{v}/{resource}/{id}
}}}

[Best Practices] are for the [URL] is that the  [URL] contains a version number so that different versions of the [SCIM] API can co-exist. Available versions can be dynamically discovered via the [SCIM Service Provider Configuration Endpoints].

!! [{$pagename}] [Example]
To replace __ALL values__ a resource, send an HTTP PUT request to the resource's respective end point:
%%prettify 
{{{
PUT /Users/2819c223-7f76-453a-919d-413861904646
Host: example.com
Accept: application/json
Authorization: Bearer h480djs93hd8
ETag: W/"a330bc54f0671c9"

{
  "schemas":["urn:scim:schemas:core:1.0"],
  "id":"2819c223-7f76-453a-919d-413861904646",
  "userName":"bjensen",
  "externalId":"bjensen",
  "name":{
    "formatted":"Ms. Barbara J Jensen III",
    "familyName":"Jensen",
    "givenName":"Barbara",
    "middleName":"Jane"
  },
  "emails":[
    {
        "value":"bjensen@example.com"
    },
    {
        "value":"babs@jensen.org"
    }
  ]
}}}} /%

!! Replace Response
The response to a PUT contains The service responds with the entire, updated [SCIM Resource] 

The [Etag] header can, in subsequent requests, be used to prevent concurrent modifications of Resources.

Unless otherwise specified a successful [HTTP PUT] operation returns a [HTTP Status Code] 200 OK response code and the entire updated [SCIM Resource] within the response body. [Example]:
%%prettify 
{{{
HTTP/1.1 200 OK
Content-Type: application/json
ETag: W/"b431af54f0671a2"
Location:"https://example.com/v1/Users/2819c223-7f76-453a-919d-413861904646"
{
  "schemas":["urn:scim:schemas:core:1.0"],
  "id":"2819c223-7f76-453a-919d-413861904646",
  "userName":"bjensen",
  "externalId":"bjensen",
  "name":{
    "formatted":"Ms. Barbara J Jensen III",
    "familyName":"Jensen",
    "givenName":"Barbara",
    "middleName":"Jane"
  },
  "emails":[
    {
        "value":"bjensen@example.com"
    },
    {
        "value":"babs@jensen.org"
    }
  ],
  "meta": {
    "created":"2011-08-08T04:56:22Z",
    "lastModified":"2011-08-08T08:00:12Z",
    "location":"https://example.com/v1/Users/2819c223-7f76-453a-919d-413861904646",
    "version":"W\/\"b431af54f0671a2\""
  }
}
}}} /%

!! More Information
There might be more information for this subject on one of the following:
[{ReferringPagesPlugin before='*' after='\n' }]