Synergist API call
This URL would get system information.
GET /jsonapi/system.json?user=user&password=user&action=version&version=3.3
Called using a browser
http://<SERVER>/jsonapi/system.json?user=user&password=user&action=version&version=3.3
Returns
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "",
"warningmessage": "",
"success": true,
"data": [
{
"uuid": "E646889F48DD423CA1300491A31E8C50",
"systemparameters_versionno": 12.2,
"systemparameters_versionrevision": "d",
"variable_apiversion": "3.3"
}
][
{
"uuid": "E646889F48DD423CA1300491A31E8C50",
"systemparameters_versionno": 12.2,
"systemparameters_versionrevision": "d",
"variable_apiversion": "3.3"
}
]
}
General parameters for all requests:
parameter | description |
---|---|
User | Synergist login ID |
Password | Synergist password |
Version | Version of the API – currently 3.3 |
Page (optional) | Data page to return, page numbering starts at 0 |
Rows (optional) | Number of records/rows to return. 0 = return all rows |
The API supports SHA512 encryption of passwords. Replace 'password' with 'sha512password' and pass the hashed password instead. see Hashing - Sha512
e.g.
http://<SERVER>/jsonAPI/diary.json?user=user&sha512password=05d929ccb4693507ab5c1c25f6a582da1f27ac225882af5295e392ae89033c356b4ddf201f78dda3c16a4d6d198998
JSON Response
When a response is sent which contains multiple records, the root of the JSON string will have the following attributes:
attribute | description |
---|---|
Totalrows | This will be the total number of records/rows in the selection, regardless of page requested |
Totalpages | This will be the total number of pages available, based on the rows parameter supplied |
Pagenumber | The current page returned in the set |
Pagerows | Number of rows requested |
A successful response will contain the following attributes at root level:
attribute | description |
---|---|
Success | True |
Responsemessage | A context response message |
Responsecode | Response code indicator |
Errormessage | Empty string |
Errorcode | 0 |
Data | The root json element containing the data result rows |
A response error will contain the following attributes at root level:-
attribute | description |
---|---|
Success | False |
Errormessage | Any error context message |
Errorcode | Response code indicator |
In case of any error, the Synergist server will return an HTTP 404 error together with an XML structure containing the error details:
<Responses>
<Error ErrorID="404500">
<ErrorText>invalid action companylist</ErrorText>
</Error>
</Responses>