Using views

Using views

When making an API call to return a section of records a 'view' can be ued to filter the date. A view is a pre-existing query. For more information on obtaining the views that can be applied to an API call see Table of views

ParameterDescriptionExamples
Parameters described in overviewuser=user&password=user&version=3.9
CompanyThe company contextcompany=1
ViewID for a pre-existing query (called a “view”)view=-1700
ResponseReturned dataA JSON string containing the data

Example 1
a (list of records filtered by a specified view)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.9&user=user&password=user&view=-1700&rows=2&page=1

Example response

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 98,
  "totalpages": 49,
  "responsemessage": "",
  "pagerows": 2,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "activityuuid": "A2905F5303AB5943B4D5E00E547B2CF5",
      "activityTimeStampModified": 1445948375,
      "activityRecordVersionNumber": 9,
      "activityAttachmentCount": "1",
      "activityCreated": "Created by SYN_Jon on 22/04/2015 at 1:02pm",
      "activityDetails1stLIne": "",
      "activityRegardingDescription": "",
      "activityRegardingDescription2": "",
      "activityRegardingWhat": "Campaign: jon test",
      "activityPriorityDescription": "High",
      "activityOwnerID": 256,
      "activityOwnerName": "SYN_Jimish",
      "activityClientCode": "",
      "activityClientName": "",
      "activityCompleted": true,
      "activityViewDate": "0000-00-00",
      "activityViewTime": "00:00:00",
      "activityViewTimezone": "",
      "activityJobNumber": "",
      "activityJobNumberSimple": "",
      "activityJobAndPhase": "",
      "activityJobAndPhaseSimple": "",
      "activitySubject": "jon test",
      "activityActivitytype": "Email Export",
      "activityID": 6161
    }
    ]
} 
 ...

Filtering the data using a key field

You can also filter the data using a key field
see Key field filters