Compute the data of a statistics widget
Computes the data of one widget over the requested period (dateRange, last 30 days by default). The response depends on widgetType: kpi returns a list of values, chart labels and datasets, table columns, rows and pagination. With format=image, a chart widget also returns graphImageUrl, the URL of a rendered image of the chart (not available for custom widgets). For a custom KPI (group: custom, metric: k<id>), the measures and dimensions are selected with customConfig.
Parameters
Header Parameters
[Authentication] Required API key, in the form {prefix}.{secret}.
"a1b2c3d4.xK9pR2mVn6QwErTyUiOpAsDfGhJkLzXcVbNmQwErTyU""^[a-zA-Z0-9]{8}\\.[A-Za-z0-9_-]+$"Query Parameters
Response format. Defaults to "json". Use "image" to retrieve the generated chart image URL.
"json""image"Request Body
Responses
Response shaped by the widgetType of the widget: kpi (list of values), chart (labels + datasets), table (columns + items + pagination). For table, two modes: standard pagination (exact data.total) or optimised pagination (data.total: null + data.hasMore + data.sortingDisabled: true) — see includeCount in the body.
Compute the data of a statistics widget Computes the data of one widget over the requested period (dateRange, last 30 days by default). The response depends on widgetType: kpi returns a list of values, chart labels and datasets, table columns, rows and pagination. With format=image, a chart widget also returns graphImageUrl, the URL of a rendered image of the chart (not available for custom widgets). For a custom KPI (group: custom, metric: k<id>), the measures and dimensions are selected with customConfig. POST /v1/stats/widget-data getStatsWidgetData Stats spm-api-key [Authentication] Required API key, in the form {prefix}.{secret}. format Response format. Defaults to "json". Use "image" to retrieve the generated chart image URL. Response shaped by the widgetType of the widget: kpi (list of values), chart (labels + datasets), table (columns + items + pagination). For table, two modes: standard pagination (exact data.total) or optimised pagination (data.total: null + data.hasMore + data.sortingDisabled: true) — see includeCount in the body. Client error - Invalid request or authentication issues Server error - Internal processing failure