Get metric chart

Aggregate a metric's published values into chart-ready buckets over a date range, with one series per top-level report group by default.

Required permission: Full Read Metrics

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

The id of the metric to chart. Metric ids come from /api/reporting/metrics.

date-time
required

The start of the date range to chart.

date-time
required

The end of the date range to chart.

string

The size of each chart bucket: day, week, month (default), quarter, or year.

string

The chart the data is shaped for: bar (default), line, or pie. Previous-year comparison and combining report groups only apply to bar and line.

string

The ids of the top-level report groups to include. All active groups are included when omitted.

boolean

Whether to return a previous-year series alongside the current one for comparison. Combines all report groups into one series.

boolean

Whether to combine all report groups into a single total series instead of one series per group.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json