Skip to main content
POST
Create a new chart

Authorizations

Authorization
string
header
required

A fine-grained data plane API key (values begin with hh_fgdp_). Rooted at an organization, workspace, or project, it carries the permissions chosen when it was created, and only the operations whose paths begin with /v1/projects/{project_id}/ accept it. Create one in the HoneyHive app under the project's, workspace's, or organization's Settings → API Keys, on the Data Plane tab.

Path Parameters

project_id
string
required

The unique identifier of the project the chart is created in

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,
five_minute,
hour,
day,
week,
month,
auto
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