Calculate total from query
Calculate all metric totals from a metricQuery
Authentication: personal access token. The spec defines an api_key security
scheme — send an Authorization: ApiKey <your-personal-access-token> header
(value format: ApiKey <your key>). A session_cookie scheme (connect.sid)
exists for browser sessions. Operations in this spec declare security: [], an
artifact of the upstream spec generator — authentication is still enforced by the
server.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectUuid | string | Yes | The uuid of the project to get charts for |
Request body
{
"invalidateCache": true,
"parameters": {
"property": "string"
},
"explore": "string",
"metricQuery": {
"dimensionOverrides": {
"property": {
"formatOptions": {
"type": "default",
"round": 0,
"separator": "default",
"currency": "string",
"compact": "auto",
"prefix": "string",
"suffix": "string",
"timeInterval": "RAW",
"custom": "string"
}
}
},
"metricOverrides": {
"property": {
"formatOptions": {
"type": "default",
"round": 0,
"separator": "default",
"currency": "string",
"compact": "auto",
"prefix": "string",
"suffix": "string",
"timeInterval": "RAW",
"custom": "string"
}
}
},
"pivotDimensions": [
"string"
],
"timezone": "string",
"metadata": {
"hasADateDimension": {
"name": "string",
"label": "string",
"table": "string"
}
},
"dateZoom": {
"xAxisFieldId": "string",
"granularity": "Second"
},
"customDimensions": [
{
"id": "string",
"name": "string",
"table": "string",
"type": "bin",
"dimensionId": "string",
"binType": "fixed_number",
"binNumber": 0
}
],
"csvLimit": 0,
"additionalMetrics": [
{
"label": "string",
"type": "percentile",
"description": "string",
"sql": "string",
"hidden": true,
"round": 0,
"compact": "auto",
"format": "km",
"separator": "default",
"table": "string",
"name": "string",
"index": 0,
"filters": [
{
"includeNull": true,
"values": [
"string"
],
"operator": "isNull",
"id": "string",
"target": {
"fieldRef": "string"
},
"settings": "string",
"disabled": true,
"required": true,
"caseSensitive": true
}
],
"baseDimensionName": "string",
"baseMetricName": "string",
"uuid": "string",
"percentile": 0,
"distinctKeys": [
"string"
],
"formatOptions": {
"type": "default",
"round": 0,
"separator": "default",
"currency": "string",
"compact": "auto",
"prefix": "string",
"suffix": "string",
"timeInterval": "RAW",
"custom": "string"
},
"generationType": "periodOverPeriod",
"baseMetricId": "string",
"timeDimensionId": "string",
"granularity": "RAW",
"periodOffset": 0
}
],
"tableCalculations": [
{
"totalMode": "formula",
"type": "number",
"format": {
"type": "default",
"round": 0,
"separator": "default",
"currency": "string",
"compact": "auto",
"prefix": "string",
"suffix": "string",
"timeInterval": "RAW",
"custom": "string"
},
"displayName": "string",
"name": "string",
"index": 0,
"sql": "string"
}
],
"limit": 0,
"sorts": [
{
"pivotValues": [
{
"value": "string",
"reference": "string"
}
],
"nullsFirst": true,
"descending": true,
"fieldId": "string"
}
],
"filters": {
"tableCalculations": "string",
"metrics": "string",
"dimensions": "string"
},
"metrics": [
"string"
],
"dimensions": [
"string"
],
"exploreName": "string"
}
}Responses
200 — Success
{
"results": {
"property": 0
},
"status": "ok"
}default — Error
{
"error": {
"data": "string",
"message": "string",
"name": "string",
"statusCode": 0
},
"status": "error"
}