I have a user in mu user store with following attributes.
{
"id": "bfae138c-9f57-4ff1-ab63-599f2034371f",
"schemas":[
"urn:scim:schemas:core:1.0"
],
"name":{
"formatted": "Ms. Barbara J Jensen III",
"familyName": "Jensen",
"givenName": "Barbara"
},
"userName": "bjensen123",
"externalId": "bjensen",
"meta":{
"lastModified": "2015-05-25T08:59:28",
"location": "https://localhost:9443/wso2/scim/Users/bfae138c-9f57-4ff1-ab63-599f2034371f",
"created": "2015-05-25T08:59:28"
}
}
I'm sending a put request to this resource with following method body.
{
"schemas":["urn:scim:schemas:core:1.0"],
"userName":"bjensen123",
"name":{
"formatted":"Ms. Bb",
}
}
What should be the name attribute of my resulting resource?
"name":{
"formatted":"Ms. Bb",
}
or
"name":{
"formatted": "Ms. Bb",
"familyName": "Jensen",
"givenName": "Barbara"
}
The PUT request is to be handled as a complete update, as opposed to a PATCH, which would only update specified attributes, and is optional for the implementer (per the SCIM 1.1 spec). The intent of a PUT is that the requester first perform a read (GET) of the user, change the desired attributes, and provide a comprehensive update, to include those attributes that aren’t actually changing (password being the one exception). Any attributes that aren’t specified with values in the PUT request would be blown away. Thus, per your example, the PUT response would come back as:
"name":{"formatted":"Ms. Bb"}
If you don’t want to lose the familyName and givenName, you have to re-specify those as well (along with any other attributes that you don’t want to blow away). Here’s the spec definition: http://www.simplecloud.info/specs/draft-scim-api-01.html