Data viewer views are a special kind of view used by the Data viewer reporting tool
Views (settings)
Use this API endpoint to get a list of 'views' for the dataviewer reporting tool. A view is essentially a saved query.
Example request:
Parameter | Description | Examples |
---|---|---|
API | API endpoint | views.json |
Tablestyle | Specify table style | tablestyle=dataviewer |
Type | Specify table | type=dataviewer |
Parameters described in overview | user=user&password=user&version=3.9 | |
company | The company context | company=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
http://<SERVER>/jsonapi/views.json?user=user&password=user&company=1&tablestyle=dataviewer&type=dataviewer&version=3.9
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 7,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"synversion": "12.90176",
"synapiversion": 3.9,
"data": [
{
"settingsUuid": "1A6B86501B16D74682CBB2344A632809",
"settingsTimestampModified": 1651742209,
"settingsRecordVersionNumber": 2,
"settingsCompany": 43,
"settingsDescription": "Hours sold",
"settingsDisplayOrder": "",
"settingsId": 46365,
"settingsUserid": 0,
"settingsDefault": false,
"settingsSort": "",
"settingsSortDirection": "ASC"
},
{
"settingsUuid": "DDDD70B71A59444CB39375FB85E4A81C",
"settingsTimestampModified": 1634215690,
"settingsRecordVersionNumber": 4,
"settingsCompany": 43,
"settingsDescription": "Spread loaded estimate",
"settingsDisplayOrder": "",
"settingsId": 46064,
"settingsUserid": 0,
"settingsDefault": false,
"settingsSort": "",
"settingsSortDirection": "ASC"
},