Skip to main content
PUT
/
v1
/
charts
/
{chart_id}
Update a chart
curl --request PUT \
  --url https://api.honeyhive.ai/v1/charts/{chart_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "metric": "<string>",
  "func": "<string>",
  "groupBy": "<string>",
  "dateRange": {
    "relative": "<string>"
  },
  "query": [
    {
      "field": "<string>",
      "value": "<string>",
      "type": "<string>",
      "operator": "<string>"
    }
  ],
  "owner_id": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "metric": "<string>",
    "func": "<string>",
    "groupBy": "<string>",
    "bucketing": "<string>",
    "dateRange": {},
    "query": [
      {
        "field": "<string>",
        "value": "<string>",
        "type": "<string>",
        "operator": "<string>"
      }
    ],
    "owner_id": "<string>",
    "is_active": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "owner_profile": {}
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

chart_id
string
required

The unique identifier of the chart to update

Body

application/json
name
string

Display name for the chart

Maximum string length: 200
description
string

Description of what the chart shows

metric
string

Name of the metric to visualize

func
string

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

groupBy
string | null

Field to group results by

bucketing
enum<string>

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 updated successfully

success
boolean
required
data
object
required