Model data endpoints¶
-
PUT/api/model/(Model: model)/(ObjectId: object_id)/embedded/(string: embedded_name)/(string: embedded_key)¶ Save a single embedded instance on the model.
-
POST/api/model/(Model: model)/(ObjectId: object_id)/embedded/(string: embedded_name)/¶ Save a single embedded instance on the model.
-
DELETE/api/model/(Model: model)/(ObjectId: object_id)/embedded/(string: embedded_name)/(string: embedded_keys)¶ Delete the embedded instances with the given keys.
-
POST/api/model/(Model: model)/(ObjectId: object_id)/call/(string: method)¶ Method to call a qualified api method on a given object.
Example: /model/Notification/123/call/count calls Notification.objects.get(id=123).api_count()
-
POST/api/model/(Model: model)/call/(string: method)¶ Method to call a qualified api method on the class model.
Example: /model/User/call/count calls User.api_count()
-
POST/api/model/(Model: model)/search¶ Method to search objects of type model by a posted elasticsearch query.
-
GET/api/model/(Model: model)/(ObjectId: object_id)¶ Method to fetch an object by id.
-
PUT/api/model/(Model: model)/(ObjectId: object_id)¶ Method to create or update an objects by id.
Data must be given in application/json format.
-
POST/api/model/(Model: model)/¶ Method to create or update an objects by id.
Data must be given in application/json format.
-
DELETE/api/model/(Model: model)/¶ Method to delete one or many objects.
Selecting the instances for deletion can be done by either a list of ObjectIds or a search query.
TODO: support ranges for the query.