You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -408,9 +408,36 @@ Output:
408
408
409
409
NB: You may sort on multiple fields by using multiple "order" parameters. You can not order on "joined" columns.
410
410
411
+
### Limit size
412
+
413
+
The "size" parameter limits the number of returned records. This can be used for top N lists together with the "order" parameter (use descending order).
414
+
415
+
```
416
+
GET /records/categories?order=id&size=2
417
+
```
418
+
419
+
Output:
420
+
421
+
```
422
+
{
423
+
"records":[
424
+
{
425
+
"id": 1
426
+
"name": "Internet"
427
+
},
428
+
{
429
+
"id": 3
430
+
"name": "Web development"
431
+
}
432
+
]
433
+
}
434
+
```
435
+
436
+
NB: If you also want to know to the total number of records you may want to use the "page" parameter.
437
+
411
438
### Pagination
412
439
413
-
The "page" parameter holds the requested page. The default page size is 20, but can be adjusted (e.g. to 50):
440
+
The "page" parameter holds the requested page. The default page size is 20, but can be adjusted (e.g. to 50).
$this->openapi->set("components|parameters|filter|description", "Filters to be applied. Each filter consists of a column, an operator and a value (comma separated). Example: id,eq,1");
$this->openapi->set("components|parameters|include|description", "Columns you want to include in the output (comma separated). Example: posts.*,categories.name");
$this->openapi->set("components|parameters|exclude|description", "Columns you want to exclude from the output (comma separated). Example: posts.content");
$this->openapi->set("components|parameters|order|description", "Column you want to sort on and the sort direction (comma separated). Example: id,desc");
$this->openapi->set("components|parameters|join|description", "Paths (comma separated) to related entities that you want to include. Example: comments,users");
$this->openapi->set("components|parameters|filter|description", "Filters to be applied. Each filter consists of a column, an operator and a value (comma separated). Example: id,eq,1");
$this->openapi->set("components|parameters|include|description", "Columns you want to include in the output (comma separated). Example: posts.*,categories.name");
$this->openapi->set("components|parameters|exclude|description", "Columns you want to exclude from the output (comma separated). Example: posts.content");
$this->openapi->set("components|parameters|order|description", "Column you want to sort on and the sort direction (comma separated). Example: id,desc");
$this->openapi->set("components|parameters|join|description", "Paths (comma separated) to related entities that you want to include. Example: comments,users");
0 commit comments