Paging and Filtering

API calls that support paging have 3 options:
- Limit
- Offset
- Sort

Limit can be any number bigger than 0, this will limit the number of results returned
Offset works together with "Limit" to specify the exact page to return. This can be any number starting from 0.

The Sort parameter is used for sorting by column both ASC as DESC.

An example with the GetLicense API call:

CURL EXAMPLE
curl -v "https://example.com/ctrller/api.php?Task=GetLicenses&Token=86ci8dnk44jiett5pth3lreuc6&AccountName=NMSAXXX&Limit=2&Offset=0&Sort=+firstname,+lastname,-email"

The above example will show the first 2 licenses ordered firstly be firstname acending, then lastname ascending and finally email descending.

The "+" stands for ascending and the "-" stands for descending.

API calls that support filtering have 2 options:
- FilterBy
- FilterValue

And example with the GetLinks API call

CURL EXAMPLE 1
curl -v "https://example.com/ctrller/api.php?&Token=foph4le40d78j6cg7s9ge7tu40&Task=GetLinks&FileserverNames[]=nmsa000000000812&Offset=0&Limit=25&Sort=-creationdate&FilterBy=LinkType&FilterValue=folder"

In this example the user is trying to get all the links where the LinkType is like "folder"
This will result in a response with all the folder links that was sent.

CURL EXAMPLE 2
curl -v "https://example.com/ctrller/api.php?&Token=foph4le40d78j6cg7s9ge7tu40&Task=GetLinks&FileserverNames[]=nmsa000000000812&Offset=0&Limit=25&Sort=-creationdate&FilterBy=Path&FilterValue=%2Fexcelfile.xlsx"

In the above example the user is filtering by "Path" with the value "/excelfile.xlsx" and is sorting on creationdate by a descending order.