Bulk replaces
Notation follows the APIs index.
Bulk replaces are the equivalent of updating each resource in data -
PUT called once per resource, with the same "completely replace" semantics.
- Each item
MUSTcarry itsid. - Services that implement optimistic concurrency
MUSTcheck each item'sversion. A mismatch is a409failure of that item. - If the single-resource
PUTsupports create-or-update, a bulk replaceMAYas well.
Example
POST /api/v1/users:bulk-replace
Accept: application/json
Content-Type: application/json
{
"data": [
{
"attributes": {
"name": "Bob Smith",
"version": "4"
},
"id": "62bed180-1f78-45d4-8a56-c996936a2947",
"type": "user"
},
{
"attributes": {
"name": "Alice Jones",
"version": "7"
},
"id": "cacba8c1-29fa-4018-8950-acd400ec76b7",
"type": "user"
}
]
}