Model data endpoints

POST /api/model/(Model: model)/search

Search objects of type model by a posted elasticsearch query.

POST /api/model/(Model: model)/call/(string: method)

Call a qualified api method on the class model.

Example: /model/User/call/count calls User.api_count()

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)

Call a qualified api method on a given object.

Example: /model/Notification/123/call/count calls Notification.objects.get(id=123).api_count()

GET /api/model/(Model: model)/(ObjectId: object_id)

Fetch an object by id.

PUT /api/model/(Model: model)/(ObjectId: object_id)

Create or update an object by id.

Data must be given in application/json format.

POST /api/model/(Model: model)/

Create or update an object by id.

Data must be given in application/json format.

DELETE /api/model/(Model: model)/

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.