Skip to main content
PATCH
Update a chart

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes retrying this request safe: a retry with the same key and body returns the original response without running the operation again. Keys are kept for 24 hours after the request completes.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Path Parameters

dashboardId
string
required

The ID of the dashboard of the chart.

Required string length: 40
chartId
string
required

The ID of the chart to update.

Required string length: 40

Body

application/json

The settings of the chart to change, as the chart carries them once read. The settings left out are kept. A chart must be working once updated: every field and choice it names must exist, and be of a kind its type and its measure can use. Its position and its display options can not be changed, and a chart never changes dashboard.

name
string

The name of the chart, as shown in the app.

Required string length: 1 - 500
Example:

"Leads by status"

type
enum<string>

The type of the chart. A metric chart has no group-by and no breakdown-by, a bar or pie chart has a group-by, a stackedBar or groupedBar chart has both. A split the new type does not have is dropped, and refused when it is sent.

Available options:
metric,
bar,
pie,
stackedBar,
groupedBar
measure
Count · object

What the chart measures, replaced as a whole: its aggregation with its field and its choice. A ratio is only available on metric charts.

groupBy
object | null

One bar or slice per value of this field. It takes a multipleSelect, userField, singleSelect, dateField or numericField custom field of the dashboard, or a native field: addedToGroupAt, createdAt or createdBy on people and companies, createdAt or createdBy on objects. A date is split by month, and its rows are labelled YYYY-MM. null removes it: only a metric chart has none.

breakdownBy
object | null

Each bar broken down per value of this second field. It takes a multipleSelect, userField, singleSelect, dateField or numericField custom field of the dashboard, or a native field: addedToGroupAt, createdAt or createdBy on people and companies, createdAt or createdBy on objects. A date is split by month, and its rows are labelled YYYY-MM. null removes it: only stackedBar and groupedBar charts have one.

filter
object | null

The filter of the chart, in the format of the filter of a view, replaced as a whole. null or a filter without conditions removes it. It takes the custom fields of the dashboard, and the native fields interactionMetadata.workspace.lastInteractedAt, createdAt or createdBy on people, createdAt, createdBy or name on companies and objects.

Response

The updated chart, as "get a chart" returns it, with its data.

data
Metric chart · object
required

A chart of a dashboard: what it computes, its status, and its data when it is working.

Example:
deprecations
string[]
Example: