Collection/Resource/Sub-Collection/Sub-Resource
Returns the sub-resource.
Not allowed to use POST. In this example, a 404 would be returned.
POST
404
Update or Create a course contact.
If {contact} is 1, then the expected behaviour is to do one of the following:
{contact}
Create if no record exists with ID 1.
Overwrite if a record exists with ID 1.
The request body should not contain an ID for the entity.
This should return the ID, if applicable, in the response.
Updates a subset of the resource's attributes.
Update specific attributes or relationships.
Can pass partial data set to update resources.
For example, updating X amount of entities where only a select few attributes need to be updated.
Use with care. PATCH's loose requirements will introduce a higher risk, such as having poor data constraints or difficult-to-read URIs.
PATCH
Consider using PUT instead of PATCH.
PUT
Deletes the resource.
This can be a soft/hard delete or deactivate/archive.
Last updated 1 year ago