Metrics
Metric range queries
The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**. .png)
api-key<token>
In: header
Path Parameters
owner*string
username or organization name
slug*string
project slug
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/metrics/string/string/query_range" \ -H "Content-Type: application/json" \ -d '{ "formulas": [], "queries": [ { "aggregate": null, "alias": "Mint (24 hours)", "disabled": false, "functions": [ { "arguments": [ { "durationValue": { "unit": "d", "value": 1 } } ], "name": "rollup_sum" } ], "id": "a", "labelSelector": {}, "query": "mint_sum" }, { "aggregate": null, "alias": "Burn (24 hours)", "disabled": false, "functions": [ { "arguments": [ { "durationValue": { "unit": "d", "value": 1 } } ], "name": "rollup_sum" } ], "id": "b", "labelSelector": {}, "query": "burn_sum" } ], "samplesLimit": 20, "timeRange": { "end": "now", "start": "now-30d", "step": 3600, "timezone": "America/Los_Angeles" } }'{ "results": [ { "alias": "string", "color": "string", "computeStats": { "binaryVersionHash": "string", "clickhouseStats": { "memoryUsage": "string", "queryDurationMs": "string", "readBytes": "string", "readRows": "string", "resultBytes": "string", "resultRows": "string" }, "computeCostMs": "string", "computedAt": "2019-08-24T14:15:22Z", "computedBy": "string", "isCached": true, "isRefreshing": true }, "error": "string", "id": "string", "matrix": { "samples": [ { "metric": { "displayName": "string", "labels": { "property1": "string", "property2": "string" }, "name": "string" }, "values": [ { "extraValues": [ 0.1 ], "timestamp": "string", "value": 0.1 } ] } ], "totalSamples": 0 } } ]}