Table of views

In Synergist a 'view' is a saved query. The view ('settings') id is typically passed as a parameter to define which selection of records is returned (see 'models')

Table of views

Views (settings)

Use this API endpoint to get a list of 'views' for a particular table. A view is essentially a saved query.

Example request:

ParameterDescriptionExamples
APIAPI endpointviews.json
TypeSpecify tabletype=activities
GeneralParameters described in overviewAuthorization: Bearer <access_token> header — see Synergist API Authentication&version=6
input optionalThe company contextcompany=1

Note: to retrieve views saved by a user, the user name and password would need to be passed

Request for a list of views

Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/views.json?&company=1&type=activities&version=6

Example request (legacy username/password):

http://<SERVER>/jsonapi/views.json?&company=1&type=activities&version=6&user=<username>&password=<password>

Example: listing special views used for creating jobs:

Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/views.json?&company=1&type=jobcreate&version=6

Example request (legacy username/password):

http://<SERVER>/jsonapi/views.json?&company=1&type=jobcreate&version=6&user=<username>&password=<password>

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 10,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "settingsUuid": "8771237951EB5241A7457443688BA09B",
      "settingsTimeStampModified": 1466508984,
      "settingsRecordVersionNumber": 0,
      "settingsCompany": 0,
      "settingsDescription": "My open activities",
      "settingsDisplayOrder": "01",
      "settingsId": -1703,
      "settingsUserid": 0,
      "settingsDefault": false,
      "settingsSort": "DATEREQUIRED",
      "settingsSortDirection": "ASC"
    }
  ]
}

Parameters

  • Type – The type of view list to return. Valid values are:
    • “Organizations”
    • “Contacts”
    • “Activities”
    • “Opportunities”
    • “Jobs”
    • “Phases”
    • "Jobcreate" (this is a special type of view used for setting the options when copying a job)
  • Company – The company number(s) which contain the view list required. If you omit this parameter or pass an empty string as the company number, all views will be returned. If passing multiple company numbers, they should be delimited with a carriage return.