Managing the returned data
We protect the API by having a default limit of 500 rows in any response , and a maximum of 1000 rows which can be set as a parameter. To control the amount of data returned in any single API call the user needs to pass rows and page parameters in the call. The API's first response will inform the user how many total rows and total pages are available to fetch (see example below). We suggest your first call uses the default limit of rows=500 and a page=1 parameter. The response to that will include totalrows and totalpages values which you can use for further iterative calls to return more pages of data.
Example:
Example request:
http://<SERVER>/jsonapi/activities.json?company=1&version=4&user=user&password=user&modelstructure=activitylist&page=1&rows=500
Return data:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 1600,
"totalpages": 320,
"responsemessage": "",
"pagerows": 5,
"pagenumber": 1,
"success": true,
"synversion": "15.000.0000",
"synapiversion": 6,
"data": [
{
"activityuuid": "F94FF187588D104BBC8A5B96A65365C4",
"activityTimeStampModified": 1652967488,
"activityRecordVersionNumber": 168,
"activityAttachmentCount": "",
"activityCreated": "Created SYN\_Jon on 27/01/2015 at 9:56am"
,etc. etc.