HTTP verbs
GET
GET will read data. Data can be a list or single object of a resource.
-
GET causes a 404 if the resource or endpoint could not be found
-
GET causes a 200 if the resource or collection of objects has been found and are returned
POST
POST will insert new data. It is possible to insert single objects or lists of objects.
- POST causes a 201 if the entity or collection of entities have been created successfully
PUT
PUT will update data. This can be a resource or a list of resources. Important: The entire resource or list of resources is always updated. If the resource to be updated does not exist, it will be created.
-
PUT causes a 201 if the entity or collection of entities have been created successfully
-
PUT causes a 200 if the entity or collection of entities have been updated successfully
PATCH
PATCH should be used to update single properties of an entity.
- PATCH causes a 200 if the entity has been updated successfully
DELETE
DELETE is used to delete entities.
- DELETE causes a 200 if the resource or entity has been deleted successfully