|
7 | 7 | [](LICENSE)
|
8 | 8 | [](https://twitter.com/marcusolsson)
|
9 | 9 |
|
10 |
| -A data source plugin for loading JSON APIs into [Grafana](https://grafana.com). |
| 10 | +A data source plugin for loading JSON APIs into [Grafana](https://grafana.com) using [JSONPath](https://goessner.net/articles/JsonPath/). |
11 | 11 |
|
12 | 12 | 
|
13 | 13 |
|
14 |
| -Extract one or more values from a JSON API using [JSON Path](https://goessner.net/articles/JsonPath/). Each path results in a field in the query result. All fields need to be of the same length. |
| 14 | +## Documentation |
15 | 15 |
|
16 |
| -## Configuration |
17 |
| - |
18 |
| -This section lists the available configuration options for the JSON API data source. |
19 |
| - |
20 |
| -### Query editor |
21 |
| - |
22 |
| -| Configuration | Description | |
23 |
| -|---------------|-------------| |
24 |
| -| **Path** | Appends a URL path to the URL configured by the data source. | |
25 |
| -| **Query string** | Overrides the custom query parameters configured by the data source. | |
26 |
| -| **Cache Time** | Determines the time in seconds to save the API response. | |
27 |
| -| **Query** | Defines the [JSON Path](https://goessner.net/articles/JsonPath/) used to extract the field. | |
28 |
| -| **Type** | Defines the type of the values returned by the JSON Path query. | |
29 |
| - |
30 |
| -### Variables |
31 |
| - |
32 |
| -[Variables](https://grafana.com/docs/grafana/latest/variables) are supported for all text configuration options. |
33 |
| - |
34 |
| -### Macros |
35 |
| - |
36 |
| -Use macros in your query string and JSON Path queries to add dashboard context to your queries. Macros are available for the **Query string** and (JSON Path) **Query** options. |
37 |
| -| Macro | Description | |
38 |
| -|-------|-------------| |
39 |
| -| `$__unixEpochFrom()` | Start of the dashboard time interval as a Unix timestamp, i.e. 1494410783 | |
40 |
| -| `$__unixEpochTo()` | End of the dashboard time interval as a Unix timestamp, i.e. 1494410783 | |
41 |
| - |
42 |
| -## Public data sets |
43 |
| - |
44 |
| -Here are a few publicly available JSON data sets that you can try out. |
45 |
| - |
46 |
| -### Reddit |
47 |
| - |
48 |
| -Get information about any subreddit by adding `.json` at the end of the URL. |
49 |
| - |
50 |
| -#### Configuration |
51 |
| - |
52 |
| -- **URL:** `https://www.reddit.com/r/grafana.json` |
53 |
| - |
54 |
| -#### Sample queries |
55 |
| - |
56 |
| -- `$.data.children[*].data.title` |
57 |
| -- `$.data.children[*].data.created_utc` |
58 |
| -- `$.data.children[*].data.ups` |
59 |
| - |
60 |
| -### TVmaze |
61 |
| - |
62 |
| -List episodes from your favorite TV series. |
63 |
| - |
64 |
| -#### Configuration |
65 |
| - |
66 |
| -- **URL:** `http://api.tvmaze.com/singlesearch/shows` |
67 |
| -- **Query string:** `q=archer&embed=episodes` |
68 |
| - |
69 |
| -#### Sample queries |
70 |
| - |
71 |
| -- `$._embedded.episodes[*].name` |
72 |
| -- `$._embedded.episodes[*].airstamp` |
73 |
| -- `$._embedded.episodes[*].season` |
74 |
| -- `$._embedded.episodes[*].number` |
| 16 | +Full documentation for the plugin is available on the [website](https://marcusolsson.github.io/grafana-json-datasource). |
0 commit comments