entity-routes logo
Docs

Examples#

Create/update#

#
json
1{
2 "@context": {
3 "operation": "create",
4 "entity": "user",
5 "validationErrors": null
6 },
7 "articles": [],
8 "id": 1,
9 "name": "Alex"
POST:/users/

List#

#
json
1{
2 "@context": {
3 "operation": "list",
4 "entity": "user",
5 "retrievedItems": 1,
6 "totalItems": 1
7 },
8 "items": ["/api/users/1"]
9}
GET:/users/

Details#

#
json
1{
2 "@context": {
3 "operation": "details",
4 "entity": "user"
5 },
6 "articles": [],
7 "id": 1,
8 "name": "Alex"
9}
GET:/users/1
Prev
Formating
Next
Decorator functions