Run a Data viewer report (view)
Parameter | Mandatory | Description | Examples | More Info |
---|---|---|---|---|
API | Yes | The API area | dataviewer.json | |
Action | Yes | The action to perform | action=start | |
Style | No | Optional styles of data | style=data, style=pivot | |
Wait | No | Time, in seconds, to wait for a response (max 30 seconds) | wait=10 | |
View | Yes | Stored filter applied | view=46136 | Using views |
Filters | No | Filter by a key field | datefrom=2020-04-01 | Filters |
General | Yes | Parameters described in overview | user=user&password=user&version=3.9 | Overview |
To get the view ID
This can be seen in Synergist file maintenance under "Table of views". Or alternatively you can access this via an API call. See Data viewer views
Example request:_
Passing no "wait" parameter - user then makes a "Check status" call to get the data:
http://<SERVER>/jsonapi/dataviewer.json?user=user&password=user&version=3.9&action=start&datefrom=2020-04-01&view=46136
Passing the "wait" parameter:
Note: No need to call "Check status"
http://<SERVER>/jsonapi/dataviewer.json?user=user&password=user&version=3.9&action=start&datefrom=2020-04-01&view=46136&wait=10
Example response:
Passing no "wait" parameter - user then makes a "Check status" call to get the data
{
"taskID": 12549,
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "",
"warningmessage": "",
"success": true,
"synversion": "12.90029",
"synapiversion": 3.9
}
Passing the "wait" parameter ... the data is returned after the number of seconds specified
{
"taskID": 15923,
"status": "DONE0",
"result": {
"DataTable": {
"Columns": [
{
"Heading": "Charge code",
"Section": "Keys",
"Type": "Text",
"ColSpans": [
1
]
},
{
"Heading": "Data type",
"Section": "Keys",
"Type": "Text",
"ColSpans": [
1
]
},
{
"Heading": "10/10/2022 - 31/10/2022",
"Section": "Values",
"Type": "Numeric",
"ColSpans": [
1
]
},
{
"Heading": "Nov 22",
"Section": "Values",
"Type": "Numeric",
"ColSpans": [
1
]
},
{
"Heading": "Dec 22",
"Section": "Values",
"Type": "Numeric",
"ColSpans": [
1
]
},
{
"Heading": "Total",
"Section": "Totals",
"Type": "Numeric",
"ColSpans": [
1
]
}
],
"Rows": [
{
"RowType": "Body",
"RowData": [
"Artwork",
"Time Estimate",
"1.00",
"0.00",
"0.00",
"1.00"
]
},
{
"RowType": "Body",
"RowData": [
"Artwork hours",
"Time Estimate",
"3.22",
"0.27",
"0.00",
"3.49"
]
},
{
"RowType": "Body",
"RowData": [
"charge",
"Time Estimate",
"3.00",
"0.00",
"0.00",
"3.00"
]
},
{
"RowType": "Body",
"RowData": [
"Client Services",
"Time Estimate",
"21.26",
"0.00",
"0.00",
"21.26"
]
},
{
"RowType": "Body",
"RowData": [
"Copy Writing",
"Time Estimate",
"0.02",
"0.03",
"0.03",
"0.08"
]
},
{
"RowType": "Body",
"RowData": [
"CR=0 + CCT = Blank + ET=Hol",
"Time Estimate",
"1.00",
"0.00",
"0.00",
"1.00"
]
},
{
"RowType": "Body",
"RowData": [
"CR=200+CCT=Activity+ET=Other",
"Time Estimate",
"2.00",
"0.00",
"0.00",
"2.00"
]
},
{
"RowType": "Body",
"RowData": [
"External jobs only CharCode 2",
"Time Estimate",
"2.00",
"0.00",
"0.00",
"2.00"
]
},
{
"RowType": "Body",
"RowData": [
"High Level Design",
"Time Estimate",
"0.00",
"0.00",
"10.00",
"10.00"
]
},
{
"RowType": "Body",
"RowData": [
"kjldsvlkjb",
"Time Estimate",
"0.73",
"0.14",
"0.00",
"0.87"
]
},
{
"RowType": "Body",
"RowData": [
"Post Production",
"Time Estimate",
"3.81",
"0.00",
"0.00",
"3.81"
]
},
{
"RowType": "Body",
"RowData": [
"Printing",
"Time Estimate",
"12.46",
"0.27",
"0.00",
"12.73"
]
},
{
"RowType": "Body",
"RowData": [
"prog",
"Time Estimate",
"0.73",
"0.14",
"0.00",
"0.87"
]
},
{
"RowType": "Body",
"RowData": [
"SPV-9407 te",
"Time Estimate",
"5.00",
"0.00",
"0.00",
"5.00"
]
},
{
"RowType": "Totals",
"RowData": [
"TOTALS",
"",
"56.23",
"0.85",
"10.03",
"67.11"
]
}
],
"HeadingRows": 1
},
"ResultText": "",
"WarningText": ""
},
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "",
"warningmessage": "",
"success": true,
"synversion": "12.960.0056",
"synapiversion": 3.95
}