Qyra
ReferenceMetrics Explorer

Run metric total query

Run a metric total query with comparison

POST/api/v1/projects/{projectUuid}/metricsExplorer/{explore}/{metric}/runMetricTotal

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

NameTypeRequiredDescription
projectUuidstringYes
explorestringYes
metricstringYes

Query parameters

NameTypeRequiredDescription
timeFramestringYes
granularitystringYes
startDatestringYes
endDatestringYes

Request body

{
  "rollingDays": 0,
  "comparisonType": "none"
}

Responses

200 — Success

{
  "results": {
    "metric": {
      "fieldType": "metric",
      "type": "percentile",
      "name": "string",
      "label": "string",
      "table": "string",
      "tableLabel": "string",
      "sql": "string",
      "description": "string",
      "source": {
        "content": "string",
        "highlight": {
          "end": {
            "character": 0,
            "line": 0
          },
          "start": {
            "character": 0,
            "line": 0
          }
        },
        "range": {
          "end": {
            "character": 0,
            "line": 0
          },
          "start": {
            "character": 0,
            "line": 0
          }
        },
        "path": "string"
      },
      "hidden": true,
      "compact": "auto",
      "round": 0,
      "format": "km",
      "separator": "default",
      "groupLabel": "string",
      "groups": [
        "string"
      ],
      "urls": [
        {
          "label": "string",
          "url": "string"
        }
      ],
      "index": 0,
      "tags": [
        "string"
      ],
      "parameterReferences": [
        "string"
      ],
      "showUnderlyingValues": [
        "string"
      ],
      "filters": [
        {
          "includeNull": true,
          "values": [
            "string"
          ],
          "operator": "isNull",
          "id": "string",
          "target": {
            "fieldRef": "string"
          },
          "settings": "string",
          "disabled": true,
          "required": true,
          "caseSensitive": true
        }
      ],
      "percentile": 0,
      "distinctKeys": [
        "string"
      ],
      "formatOptions": {
        "type": "default",
        "round": 0,
        "separator": "default",
        "currency": "string",
        "compact": "auto",
        "prefix": "string",
        "suffix": "string",
        "timeInterval": "RAW",
        "custom": "string"
      },
      "dimensionReference": "string",
      "baseDimensionType": "string",
      "baseDimensionTimeInterval": "RAW",
      "requiredAttributes": {
        "property": "string"
      },
      "anyAttributes": {
        "property": "string"
      },
      "defaultTimeDimension": {
        "interval": "RAW",
        "field": "string"
      },
      "spotlight": {
        "owner": "string",
        "defaultFilter": {
          "includeNull": true,
          "values": [
            "string"
          ],
          "operator": "isNull",
          "id": "string",
          "target": {
            "fieldRef": "string"
          },
          "settings": "string",
          "disabled": true,
          "required": true,
          "caseSensitive": true
        },
        "defaultSegment": "string",
        "segmentBy": [
          "string"
        ],
        "filterBy": [
          "string"
        ],
        "categories": [
          "string"
        ],
        "visibility": "show"
      },
      "drivers": [
        "string"
      ],
      "aiHint": "string",
      "richText": "string",
      "compiledTimestampFilters": [
        {
          "compiledSql": "string",
          "fieldId": "string",
          "id": "string"
        }
      ],
      "compiledRelativeDateFilters": [
        {
          "compiledSql": "string",
          "fieldId": "string",
          "id": "string"
        }
      ],
      "compiledDistinctKeys": [
        "string"
      ],
      "compiledValueSql": "string",
      "compilationError": {
        "message": "string"
      },
      "tablesAnyAttributes": {
        "property": {
          "property": "string"
        }
      },
      "tablesRequiredAttributes": {
        "property": {
          "property": "string"
        }
      },
      "tablesReferences": [
        "string"
      ],
      "compiledSql": "string",
      "availableTimeDimensions": [
        {
          "fieldType": "dimension",
          "type": "date",
          "name": "string",
          "label": "string",
          "table": "string",
          "tableLabel": "string",
          "sql": "string",
          "description": "string",
          "source": {
            "content": "string",
            "highlight": {
              "end": {
                "character": 0,
                "line": 0
              },
              "start": {
                "character": 0,
                "line": 0
              }
            },
            "range": {
              "end": {
                "character": 0,
                "line": 0
              },
              "start": {
                "character": 0,
                "line": 0
              }
            },
            "path": "string"
          },
          "hidden": true,
          "compact": "auto",
          "round": 0,
          "format": "km",
          "separator": "default",
          "groupLabel": "string",
          "groups": [
            "string"
          ],
          "urls": [
            {
              "label": "string",
              "url": "string"
            }
          ],
          "index": 0,
          "tags": [
            "string"
          ],
          "parameterReferences": [
            "string"
          ],
          "group": "string",
          "requiredAttributes": {
            "property": "string"
          },
          "anyAttributes": {
            "property": "string"
          },
          "timeInterval": "RAW",
          "timeIntervalLabel": "string",
          "timeIntervalBaseDimensionName": "string",
          "timeIntervalBaseDimensionType": "string",
          "customTimeInterval": "string",
          "isAdditionalDimension": true,
          "skipTimezoneConversion": true,
          "timestampDomain": "aware",
          "colors": {},
          "isIntervalBase": true,
          "aiHint": "string",
          "formatOptions": {
            "type": "default",
            "round": 0,
            "separator": "default",
            "currency": "string",
            "compact": "auto",
            "prefix": "string",
            "suffix": "string",
            "timeInterval": "RAW",
            "custom": "string"
          },
          "caseSensitive": true,
          "image": {
            "fit": "string",
            "height": 0,
            "width": 0,
            "url": "string"
          },
          "richText": "string",
          "filterAutocomplete": {
            "optionsFromDimension": {
              "labelDimension": "string",
              "dimension": "string",
              "model": "string"
            },
            "labelDimension": "string",
            "fetchFromWarehouse": true,
            "values": [
              {
                "label": "string",
                "value": "string"
              }
            ]
          },
          "spotlight": {
            "segmentBy": true,
            "filterBy": true
          },
          "compiledTimestampFilters": [
            {
              "compiledSql": "string",
              "fieldId": "string",
              "id": "string"
            }
          ],
          "compiledRelativeDateFilters": [
            {
              "compiledSql": "string",
              "fieldId": "string",
              "id": "string"
            }
          ],
          "compiledDistinctKeys": [
            "string"
          ],
          "compiledValueSql": "string",
          "compilationError": {
            "message": "string"
          },
          "tablesAnyAttributes": {
            "property": {
              "property": "string"
            }
          },
          "tablesRequiredAttributes": {
            "property": {
              "property": "string"
            }
          },
          "tablesReferences": [
            "string"
          ],
          "compiledSql": "string"
        }
      ],
      "timeDimension": {
        "interval": "RAW",
        "field": "string",
        "table": "string"
      }
    },
    "comparisonValue": 0,
    "value": 0
  },
  "status": "ok"
}

default — Error

{
  "error": {
    "data": "string",
    "message": "string",
    "name": "string",
    "statusCode": 0
  },
  "status": "error"
}