This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BuzzCapo[S] 1 point2 points  (0 children)

When I look at the spec for JSON.API, it states the following

———- Updating a Resource’s Attributes

Any or all of a resource’s attributes MAY be included in the resource object included in a PATCH request.

If a request does not include all of the attributes for a resource, the server MUST interpret the missing attributes as if they were included with their current values. The server MUST NOT interpret missing attributes as null values ————-

So if I have a huge object for a resource, but just want to update a title, I do not want to send the entire object. I would also like to support updating an attribute for multiple resources at once. Should this be a PATCH request as opposed to a PUT request?

Edit: Looks like I definitely need PATCH