Get Model List

get
Get list of model records and apply filters

https://YOUR_JET_BRIDGE_HOSTNAME/jet_api/models/:model/
Request
Response
Request
Path Parameters
model
required
string
Unique model name
Headers
Authorization
optional
string
Token authentication, example: Authorization: Token f42a3cab3f146b283701a4e314f1c7ba57fdb59e
Query Parameters
FIELD_1
optional
string
Filter records by field value
FIELD_2_LOOKUP
optional
string
Filter records by filed value with different lookup, example: ?name=John ?name__startswith=Jo Read more about lookups on Model Field Types page
_order_by
optional
string
Sort by field, example: "name" - sort by name ascending "-name" -sort by name descending
page
optional
integer
Page to return
_per_page
optional
integer
Items to return per page
_segment
optional
string
Name of SQL segment to apply, contains SQL query in body
_search
optional
string
Search query
_relation
optional
string
Filter by related models with custom JOIN
Response
200: OK
Cake successfully retrieved.
{
// Total number of records
"count": 2
// Number of pages
"num_pages": 1,
// Records to show per page
"per_page": 25
// JSON encoded records
"results": [
{
"id": 2,
"unique_name": "China",
"name": "China",
"alpha_3": "CHN",
"continent": null,
"order": 1,
// (optional) How to display record in interface
"__str__": "China"
},
{
"id": 1,
"unique_name": "usa",
"name": "USA",
"alpha_3": "USA",
"continent": 1,
"order": 2,
"__str__": "USA"
}
],
"num_pages": 1,
"per_page": 25
}
403: Forbidden
Could not find a cake matching this query.