Skip to main content
POST
Create a new chart

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Display name for the chart

Maximum string length: 200
metric
string
required

Name of the metric to visualize

Minimum string length: 1
description
string

Description of what the chart shows

func
string

Aggregation function to apply (e.g. sum, avg, median, min, max)

groupBy
string | null

Field to group results by

bucketing
enum<string>
default:day

Time bucket granularity for aggregation

Available options:
minute,
hour,
day,
week,
month
dateRange
object

Time range to query

query
object[]

Filters to apply to the chart data

owner_id
string

ID of the user who owns this chart

Minimum string length: 1

Response

200 - application/json

Chart created successfully

success
boolean
required
data
object
required