Pagination
Dock2Dock API has have support for bulk fetches through list API methods. These list API methods share a common structure and follow the Open Data Protocol (OData).
All list API methods currently return every available record. To limit the results, please use the
$top
parameter in your queries.
$filter
The $filter
system query option allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with $filter
is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response.
Basic predicates, built-in functions
There are several kinds of basic predicates and built-in functions for $filter
, including logical operators and arithmetic operators. For more detailed information, please refer to OData V4 URL Conventions Document. The request below using $filter
to get people with FirstName "Scott".
GET /CrossdockLabel/?$filter=CustomerName eq 'New World Ilam
$orderby
The $orderby
system query option allows clients to request resources in either ascending order using asc or descending order using desc. If asc
or desc
not specified, then the resources will be ordered in ascending order. The request below orders CrossdockLabel on property DateCreated in descending order.
GET /CrossdockLabel/?$orderby=DateCreated desc
$top and $skip
The $top
system query option requests the number of items in the queried collection to be included in the result. Ranging between 1 and 100. The $skip
query option requests the number of items in the queried collection that are to be skipped and not included in the result.
The request below returns the first two people of the CrossdockLabel entity set.
GET /CrossdockLabel/?$top=2
$count
The $count
system query option allows clients to request a count of the matching resources included with the resources in the response.
The request below returns the total number of CrossdockLabel in the collection.
GET /CrossdockLabel/?$count=true
[
{
"count": 20, //without $count=true, returns null
"value": [
{
"id": "f7ec737a-34ea-4ef3-85b1-4a83867b4411",
"dateCreated": "2023-08-07T08:03:07.098Z",
"lastUpdatedDate": "2023-08-07T08:03:07.098Z",
"isDeleted": true,
"customerName": "New World Ilam"
}
]
}
]