General
A json object is posted to query enpoint similar to the following code:
{
'format': 'json',
'interval': '2s',
'intervalMs': 2000,
'maxDataPoints': 1528,
'panelId': 5,
'range':
{
'from': '2018-03-18T19:48:06.985Z',
'raw': {'from': 'now-1h', 'to': 'now'},
'to': '2018-03-18T20:48:06.985Z'
},
'rangeRaw': {'from': 'now-1h', 'to': 'now'},
'scopedVars':
{
'__interval': {'text': '2s', 'value': '2s'},
'__interval_ms': {'text': 2000, 'value': 2000
}
},
'targets':
[
{'refId': 'A', 'target': '16:temperature', 'type': 'timeserie'},
{'refId': 'B', 'target': '21:temperature', 'type': 'timeserie'},
{'refId': 'D', 'target': '21:dewpoint', 'type': 'timeserie'}
],
'timezone': 'browser'
}
Intervall range releations:
| Range | Intervall |
|---|---|
| Last hour (now-1h) | 2s |
| Last 6 hours (now-6h) | 15s |
| Last 12 hours (now-12h) | 30s |
| Last 24 hours (now-24h) | 1m |
| Last 2 days (now-2d) | 2m |
| Last 7 days (now-7d) | 5m |
| Last 30 days (now-30d) | 30m |
| Last 90 days (now-90d) | 1h |
| Last 6 months(now-6M) | 3h |
| Last year (now-1y) | 6h |