I would like to update an embedded document through an Api request and don't want to PUT the whole parent resource:
Parent {
_id: 123,
...
events: [
...
...
]
}
To update the embedded document, RFC 6902 A.16 suggests:
PATCH /parent-resource/123
[
{ "op": "add", "path": "/events/-", "value": {new event obj}}
]
Success Response: 204 no-content
I do like this quite a bit and will offer this. But for slightly easier use, would an alias of:
POST /parent-resource/123/events
{new event object}
Success Response: 204 no-content
also be acceptable? Also, what are some good resources regarding JSON Api standards?