Meta-data

Provides the API consumer with the attributes of Synergist's fields

Meta-data

If you require to see the related metadata for Synergist fields you should pass the parameter style=modelstructure when making the appropriate API call. You also need to specify which model you wish to use. This will specify for which fields attributes will be returned.

Data models

If you wish to return the field attributes you will typically call the API and specify the data model required. All the key tables will have two standard models available <tablename>list model <tablename>details model

##Example - Activities e.g using the activities.json API to return the field attributes for the required model

  • activitylist
  • activitydetails

Parameter|Description|Examples| ---|---|---|--- Action|Not required|| <General>|Parameters described in overview|user=user&password=user&version=3.3 Company|The company context|company=1 Style|Which kind of data is required|style=modelstructure Modelstructure|Name of model required|Modelstructure=activitylist / Modelstructure=activitydetails Response|Returned data|A JSON string containing the data

Example request: request for meta-data (structure of specified model)

http://<SERVER>/jsonapi/activities.json?company=1&version=3.3&user=user&password=user&style=modelstructure&modelstructure=activitylist

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 0,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "data": "activityDetails1stLine",
      "label": "Details",
      "align": "",
      "editable": false,
      "fieldtype": "text",
      "displayorder": 0,
      "mandatory": false
    }
  ]
}

*Note: The response contains "etc., etc." in the original data, indicating there are more fields not shown in this example.

Response attributes (meta-data):

AttributeDescription
dataField name
labelThe suggested label for the field
alignSuggested alignment for the field e.g. a financial field may be aligned right
editableIndicates whether field is editable
fieldtypeIndicates type of field – text/number/time/date/boolean
displayorderIndicates the hierarchical position of a field in a list or form display