Statisticsv2
All the endpoints that can be called on the Statisticsv2 controller.
All the endpoints require the API_STATISTICS permission, except for:
POSTdashboardDeletePUTdashboard
Which require the DASHBOARD_CUD permission.
Updates this dashboard's name.
""Pattern: ^[0-9a-zA-Z\' :+*]+$No content
PUT /api/v2/statisticsv2/dashboard HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18
"id=1&name=''"No content
Deletes this dashboard and its widgets.
No content
POST /api/v2/statisticsv2/dashboardDelete HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 8
{
"id": 1
}No content
Returns all data of this widget to show.
Widget data specifics can be added how is shown in the example. Adjust to your own needs.
User to be filtered out.
ID of the user to be filtered out.
Disables caching if sent with request.
Enables debug mode and disables caching if sent with request.
ID of the panel/widget.
showData example
GET /api/v2/statisticsv2/showData?panelID=1 HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
showData example
{
"item": {
"buckets": [
"2025-01-01",
"2025-01-02",
"2025-01-03",
"2025-01-04",
"2025-01-05",
"2025-01-06",
"2025-01-07"
],
"facts": {
"Tickets assigned": [
0,
0,
0,
0,
0,
0,
0
],
"Tickets handled": [
0,
0,
0,
0,
0,
0,
0
]
}
},
"type": "item"
}Creates a new widget.
See the example for how to write the dataURL.
""Pattern: ^[0-9a-zA-Z :+*\-]+$Identical to the way showData allows these requested parameters in the URL.
""Pattern: ^[a-zA-Z0-9\.\:\/\-\ \=\?\&\[\]\_\:\+\*\@]+$tablePattern: ^([a-zA-Z]+)$0false0055widget example
POST /api/v2/statisticsv2/widget HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 187
{
"dashboardID": 1,
"title": "",
"dataURL": "",
"viewType": "table",
"fontSizeTitle": 1,
"fontSizeData": 1,
"pivotOnColumn": 0,
"ticketArchived": false,
"position_x": 0,
"position_y": 0,
"width": 5,
"height": 5
}widget example
{
"item": {
"widgetID": 10
},
"type": "item"
}Updates an existing widget.
See the example for how to write the dataURL. You need to fill in all the data, not just the changed data.
""Pattern: ^[0-9a-zA-Z :+*\-]+$""Pattern: ^[a-zA-Z0-9\.\:\/\-\ \=\?\&\[\]\_\:\+\*\@]+$tablePattern: ^([a-zA-Z]+)$0falsewidget example
PUT /api/v2/statisticsv2/widget HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 208
"dataURL='facts[]=ticketIncoming&factTitleticketIncoming=&groupBy[]=timeHour&filters[]=timeRelativeToday&font_size_title=12&font_size_data=10&pivot_on_column=0'&fontSizeData=10&fontSizeTitle=12&id=10"widget example
{
"message": "Widget saved.",
"status": "success",
"type": "result"
}Deletes this widget.
No content
POST /api/v2/statisticsv2/widgetDelete HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 8
{
"id": 1
}No content
Updates this widget's position.
No content
POST /api/v2/statisticsv2/widgetPosition HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 41
{
"id": 1,
"width": 1,
"height": 1,
"x": 1,
"y": 1
}No content
Sets the setting to automatically refresh this widget on or off.
No content
PUT /api/v2/statisticsv2/widgetAutoRefresh HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18
"id=1&state=1"No content
Returns the info on where this widget's data is being sent to.
No content
GET /api/v2/statisticsv2/widgetSendOptions?id=1 HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
No content
Creates a setting to send all widget data to an email.
The interval you want to send at.
^([0-9a-zA-Z\ \:\*]+)$Has to be an email address or multiple email addresses comma-separated
""Pattern: ^([a-zA-Z0-9 @+-_.,]+)$No content
POST /api/v2/statisticsv2/widgetSendOptions HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 48
{
"id": 1,
"sendFrequency": "text",
"toAddresses": ""
}No content
Returns and downloads all data of this widget, or of the data you sent along with the request.
You either need to send the widget/panel ID, or the data in such a way provided in the example.
User to be filtered out.
ID of the user to be filtered out.
Disables caching if sent with request.
Enables debug mode and disables caching if sent with request.
ID of the panel/widget.
downloadData example
GET /api/v2/statisticsv2/downloadData?panelID=1 HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
downloadData example
"Time" "Tickets assigned" "Tickets handled"
"2025-01-01" "0" "0"
"2025-01-02" "0" "0"
"2025-01-03" "0" "0"
"2025-01-04" "0" "0"
"2025-01-05" "0" "0"
"2025-01-06" "0" "0"
"2025-01-07" "0" "0"