API v3.9
API v3.9 requires Synergist v12.9 or higher
Overview
This document defines the Synergist API which is based on REST.
JSON/XML/CSV
All examples are shown using JSON. However, this API also supports XML.
To use XML, make the following changes to the API call:
replace 'jsonapi' with 'xmlapi'
replace '.json?' with '.xml?'
Example:
JSON call
http:///jsonapi/activities.json?company=1&version=3.9&user=user&password=user&style=modeldata&modelstructure=activitylist
XML call
http:///xmlapi/activities.xml?company=1&version=3.9&user=user&password=user&style=modeldata&modelstructure=activitylist
JSON/XML - passing data
When using certain CRUD calls the API requires data is passed in the form of a structured array.
JSON call
http://SERVER/jsonapi/tspending.json?user=user&password=user&version=3.9&action=update&input={
"data": [
{
"tspEntryNo": 794,
"tspHoursNormal": 1.2
}
]
}
XML call
http://SERVER/xmlapi/tspending.xml?user=user&password=user&version=3.9&action=update&input=
794
1.3
To use CSV, make the following changes to the API call:
replace 'jsonapi' with 'csvapi'
replace '.json?' with '.csv?'
Note: Not all API calls support the CSV option. It is only appropriate for listing data. If such a call is made the server will return a CSV file when possible.
example:
http:///csvapi/activities.csv?company=1&version=3.9&user=user&password=user&modelstructure=activitylist