Statisticsv2

All the endpoints that can be called on the Statisticsv2 controller.

All the endpoints require the API_STATISTICS permission, except for:

  • POST dashboardDelete

  • PUT dashboard

Which require the DASHBOARD_CUD permission.

options

get

Returns the options available to the statistics showQuery and showData.

Authorizations
HTTPRequired
Responses
200

Successful response

application/json
get
/api/v2/statisticsv2/options
200

Successful response

dashboard

get

Returns all the dashboard data by the dashboard ID.

Authorizations
HTTPRequired
Responses
200

Successful response

application/json
get
/api/v2/statisticsv2/dashboard
200

Successful response

dashboard

post

Creates a new dashboard.

Authorizations
HTTPRequired
Body
Responses
200

Successful response

application/json
post
/api/v2/statisticsv2/dashboard
200

Successful response

dashboard

put

Updates this dashboard's name.

Authorizations
HTTPRequired
Body
idstringOptional

type: number

The dashboard's ID.

namestringOptional

type: ^[0-9a-zA-Z\' :+*]+$ = ' '

Responses
200

Successful response

application/json
put
/api/v2/statisticsv2/dashboard
200

Successful response

dashboardDelete

post

Deletes this dashboard and its widgets.

Authorizations
HTTPRequired
Body
idstringOptional

type: number

Responses
200

Successful response

application/json
post
/api/v2/statisticsv2/dashboardDelete
200

Successful response

dashboards

get

Returns all the dashboards.

Authorizations
HTTPRequired
Responses
200

Successful response

application/json
get
/api/v2/statisticsv2/dashboards
200

Successful response

widgetData

get

Returns all the data of this widget.

Authorizations
HTTPRequired
Responses
200

Successful response

application/json
get
/api/v2/statisticsv2/widgetData
200

Successful response

showData

get

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.

Authorizations
HTTPRequired
Responses
200

OK

application/json
Responseobject
get
/api/v2/statisticsv2/showData
200

OK

widget

post

Creates a new widget.

See the example for how to write the dataURL.

Authorizations
HTTPRequired
Body
dashboardIDstringOptional

type: number

titlestringOptional

type: ^[0-9a-zA-Z :+*\-]+$ = ' '

dataURLstringOptional

type: ^[a-zA-Z0-9\.\:\/\-\ \=\?\&\[\]\_\:\+\*\@]+$ = ' '

Identical to the way showData allows these requested paramters in the URL.

viewTypestringOptional

type: ^([a-zA-Z]+)$ = 'table'

fontSizeTitlestringOptional

type: number = null

fontSizeDatastringOptional

type: number = null

pivotOnColumnstringOptional

type: ^([0-9]+)$ = 0

ticketArchivedstringOptional

type: boolean = false

position_xstringOptional

type: number = 0

position_ystringOptional

type: number = 0

widthstringOptional

type: number = 5

heightstringOptional

type: number = 5

Responses
200

OK

application/json
Responseobject
post
/api/v2/statisticsv2/widget
200

OK

widget

put

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.

Authorizations
HTTPRequired
Body
idstringOptional

type: number

titlestringOptional

type: ^[0-9a-zA-Z :+*\-]+$ = ' '

dataURLstringOptional

type: ^[a-zA-Z0-9\.\:\/\-\ \=\?\&\[\]\_\:\+\*\@]+$ = ' '

viewTypestringOptional

type: ^([a-zA-Z]+)$ = 'table'

fontSizeTitlestringOptional

type: number = null

fontSizeDatastringOptional

type: number = null

pivotOnColumnstringOptional

type: number = 0

ticketArchivedstringOptional

type: boolean = false

Responses
200

OK

application/json
Responseobject
put
/api/v2/statisticsv2/widget
200

OK

widgetDelete

post

Deletes this widget.

Authorizations
HTTPRequired
Body
idstringOptional

type: number

Responses
200

Successful response

application/json
post
/api/v2/statisticsv2/widgetDelete
200

Successful response

widgetPosition

post

Updates this widget's position.

Authorizations
HTTPRequired
Body
idstringOptional

type: number

widthstringOptional

type: number = null

heightstringOptional

type: number = null

xstringOptional

type: number = null

ystringOptional

type: number = null

Responses
200

Successful response

application/json
post
/api/v2/statisticsv2/widgetPosition
200

Successful response

widgetAutoRefresh

put

Sets the setting to automatically refresh this widget on or off.

Authorizations
HTTPRequired
Body
idstringOptional

type: number

statestringOptional

type: ^(0|1)$

Responses
200

Successful response

application/json
put
/api/v2/statisticsv2/widgetAutoRefresh
200

Successful response

widgetSendOptions

get

Returns the info on where this widget's data is being sent to.

Authorizations
HTTPRequired
Responses
200

Successful response

application/json
get
/api/v2/statisticsv2/widgetSendOptions
200

Successful response

widgetSendOptions

post

Creates a setting to send all widget data to an email.

Authorizations
HTTPRequired
Body
idstringOptional

type: number

sendFrequencystringOptional

type: ^([0-9a-zA-Z\ \: \*]+)$

Set for if you want to send it with a regular interval.

toAddressesstringOptional

type: ^([a-zA-Z0-9 @+-_.,]+)$

Has to be an email address or multiple email addresses comma-separated

Responses
200

Successful response

application/json
post
/api/v2/statisticsv2/widgetSendOptions
200

Successful response

downloadData

get

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.

Authorizations
HTTPRequired
Responses
200

OK

text/plain
Responsestring
get
/api/v2/statisticsv2/downloadData
200

OK

Last updated