Skip to content

Commit c4726d9

Browse files
committed
fix docs
1 parent e9e4f74 commit c4726d9

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,17 @@ By default all columns are selected. With the "include" parameter you can select
325325
An asterisk ("*") may be used as a wildcard to indicate "all columns". Similar to "include" you may use the "exclude" parameter to remove certain columns:
326326

327327
```
328-
GET /records/categories?include=name
329-
GET /records/categories?include=categories.name
330-
GET /records/categories?exclude=categories.id
328+
GET /records/categories/1?include=name
329+
GET /records/categories/1?include=categories.name
330+
GET /records/categories/1?exclude=categories.id
331331
```
332332

333333
Output:
334334

335335
```
336-
{"categories":{"columns":["name"],"records":[["Web development"],["Internet"]]}}
336+
{
337+
"name": "Internet"
338+
}
337339
```
338340

339341
NB: Columns that are used to include related entities are automatically added and cannot be left out of the output.
@@ -344,13 +346,24 @@ With the "order" parameter you can sort. By default the sort is in ascending ord
344346

345347
```
346348
GET /records/categories?order=name,desc
347-
GET /records/categories?order[]=icon,desc&order[]=name
349+
GET /records/categories?order=icon,desc&order=name
348350
```
349351

350352
Output:
351353

352354
```
353-
{"categories":{"columns":["id","name"],"records":[[3,"Web development"],[1,"Internet"]]}}
355+
{
356+
"records":[
357+
{
358+
"id": 3
359+
"name": "Web development"
360+
},
361+
{
362+
"id": 1
363+
"name": "Internet"
364+
}
365+
]
366+
}
354367
```
355368

356369
NB: You may sort on multiple fields by using multiple "order" parameters.
@@ -367,7 +380,19 @@ GET /records/categories?order=id&page=1,50
367380
Output:
368381

369382
```
370-
{"categories":{"columns":["id","name"],"records":[[1,"Internet"],[3,"Web development"]],"results":2}}
383+
{
384+
"records":[
385+
{
386+
"id": 3
387+
"name": "Web development"
388+
},
389+
{
390+
"id": 1
391+
"name": "Internet"
392+
}
393+
],
394+
"results": 2
395+
}
371396
```
372397

373398
NB: Pages that are not ordered cannot be paginated.

0 commit comments

Comments
 (0)