Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit ed28d0a

Browse files
authored
Merge pull request #59 from jakebrinkmann/master
DOC: reference the table type
2 parents b46d6bd + b0c5475 commit ed28d0a

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Your backend needs to implement 4 urls:
1616

1717
### Query API
1818

19-
Example request
19+
Example `timeserie` request
2020
``` javascript
2121
{
2222
"panelId": 1,
@@ -35,15 +35,15 @@ Example request
3535
"interval": "30s",
3636
"intervalMs": 30000,
3737
"targets": [
38-
{ "target": "upper_50", refId: "A" },
39-
{ "target": "upper_75", refId: "B" }
38+
{ "target": "upper_50", refId: "A", "type": "timeserie" },
39+
{ "target": "upper_75", refId: "B", "type": "timeserie" }
4040
],
4141
"format": "json",
4242
"maxDataPoints": 550
4343
}
4444
```
4545

46-
Example response
46+
Example `timeserie` response
4747
``` javascript
4848
[
4949
{
@@ -63,6 +63,25 @@ Example response
6363
]
6464
```
6565

66+
If the metric selected is `"type": "table"`, an example `table` response:
67+
```json
68+
[
69+
{
70+
"columns":[
71+
{"text":"Time","type":"time"},
72+
{"text":"Country","type":"string"},
73+
{"text":"Number","type":"number"}
74+
],
75+
"rows":[
76+
[1234567,"SE",123],
77+
[1234567,"DE",231],
78+
[1234567,"US",321]
79+
],
80+
"type":"table"
81+
}
82+
]
83+
```
84+
6685
### Annotation API
6786

6887
The annotation request from the Simple JSON Datasource is a POST request to

0 commit comments

Comments
 (0)