Get Chart builder data

Changed on

Returns the same chart data as the cabinet "Chart builder" (labels + datasets), scoped to the project of the API key. Use GET /reports/chart-builder/catalog to discover valid metric, x_axis and series ids. from/to are interpreted in the project timezone; defaults to the last 30 days.

get/reports/chart-builder

Request

  • Base URL
    https://api.web2wave.com/api
  • URL
    https://api.web2wave.com/api/reports/chart-builder
  • Auth
    API key in header api_key

Query parameters

metricstring required

Metric id from catalog.builder_metrics.

x_axisstring

Dimension id from catalog.dimensions for the X axis.

seriesstring

Dimension id to break the chart into series, or none. Ignored when equal to x_axis.

sort'value' | 'label'

Sort order key.

direction'asc' | 'desc'

Sort direction.

y_operator'>' | '>=' | '<' | '<=' | '='

Filter rows by metric value together with y_value.

y_valuenumber

Metric value threshold for y_operator.

fromstring date

Start date (YYYY-MM-DD, project timezone). Defaults to 29 days ago.

tostring date

End date (YYYY-MM-DD, project timezone). Defaults to today.

string[]
OR
string

Comma-separated values

Limit to quiz ids.

string[]
OR
string

Comma-separated values

Limit to paywall ids.

string[]
OR
string

Comma-separated values

Filter by utm_source values.

string[]
OR
string

Comma-separated values

Filter by utm_medium values.

string[]
OR
string

Comma-separated values

Filter by utm_campaign values.

string[]
OR
string

Comma-separated values

Filter by utm_content values.

string[]
OR
string

Comma-separated values

Filter by utm_term values.

payment_systeminteger

Filter by payment system id.

user_country_codestring

Filter by user country code.

user_platformstring

Filter by user platform.

experiment_idinteger

Filter by experiment id.

experiment_variantinteger

Experiment variant (used with experiment_id, default 0).

user_propertystring

User property name to filter by (with user_property_value).

user_property_valuestring

User property value.

Headers

api_keystring required

API key for authentication

Response

Chart data

successboolean
fromstring date-time
tostring date-time

Example response

{
  "success": true,
  "builder": {
    "title": "Total revenue by Day"
  }
}

Changes