Update
To update a resource, perform an HTTP PUT
including the case-sensitive identifier (_id
) as the final element of the path to the resource
and the JSON resource as the payload.
Use the If-Match: _rev
header to verify the version you modify.
Use If-Match: *
if the version does not matter.
PUT /users/some-id HTTP/1.1
Host: example.com
Accept: application/json
Content-Length: ...
Content-Type: application/json
If-Match: _rev
{ JSON resource }
When updating a resource, include all the attributes to retain. Omitting an attribute in the resource amounts to deleting it unless it is not under the control of your application. Attributes not under the control of your application include private and read-only attributes. Virtual attributes and relationship references might not be under the control of your application.
Parameter | Description |
---|---|
|
Return only the specified fields in the body of the response. The If the |
|
Format the body of the response. |