Skip to main content

Add a metric table

POST 

/projects/:project_id/metric-tables

Adds a metric table: a warehouse table of pre-computed numbers, such as daily revenue per country. Give each column a role:

  • time: the period a row covers. At most one, and required unless grain is single_number.
  • metric_value: a number to chart. Needs a metric_name and a roll_up that says how rows add up into longer periods.
  • dimension: a column to break down and filter by.
  • identifier: links rows to an entity of the workspace, at most one column per entity.
  • ignored: not used.

Adding a table doesn't index it; call POST /projects/{project_id}/metric-tables/{metric_table_id}/index afterwards.

The API key acts as an Org Admin for this request. A request for a workspace of another organization returns 404.

Request​

Responses​

OK