Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 950beb0

Browse files
committed
more documentation about the new api endpoint
1 parent 4434106 commit 950beb0

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

docs/cloud/http-api.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,45 @@ curl -u "api_key:<Your Grafana.com API Key>" https://$base_out/tags/delSeries -d
207207
```
208208

209209
### Finding Metrics
210+
#### Non-tagged with `/metrics/expand`
211+
212+
Returns metrics which match the `query`.
213+
214+
* Method: GET or POST
215+
* API key type: any (including MetricsPublisher)
216+
217+
##### Headers
218+
219+
* `Authorization: Bearer <api-key>` required
220+
221+
##### Parameters
222+
223+
* query: required and may be specified multiple times, in the format described in [Graphite pattern](#graphite-patterns)
224+
* groupByExpr: if true, then the results get grouped by the query which yielded them, otherwise all results are in a flat list. (defaults to false)
225+
* leavesOnly: if true, only leaf nodes get returned, if false branch nodes also get returned. (defaults to false)
226+
* jsonp: true/false: enables jsonp
227+
228+
##### Example
229+
230+
```sh
231+
curl -H "Authorization: Bearer $key" "$base_out/metrics/expand?groupByExpr=true&query=some.id.of.a.metric.[1-3]&query=some.id.of.a.metric.[67]"
232+
{
233+
"some.id.of.a.metric.[1-3]": [
234+
"some.id.of.a.metric.1",
235+
"some.id.of.a.metric.2",
236+
"some.id.of.a.metric.3"
237+
],
238+
"some.id.of.a.metric.[67]": [
239+
"some.id.of.a.metric.6",
240+
"some.id.of.a.metric.7"
241+
]
242+
}
243+
```
244+
210245
#### Non-tagged With `/metrics/find`
211246

212-
Returns metrics which match the `query` and have received an update since `from`.
247+
Returns metrics which match the `query` and have received an update since `from`,
248+
de-duplicated by the last name node (used for the name auto-complete).
213249

214250
* Method: GET or POST
215251
* API key type: any (including MetricsPublisher)
@@ -220,7 +256,7 @@ Returns metrics which match the `query` and have received an update since `from`
220256

221257
##### Parameters
222258

223-
* query (required): [Graphite pattern](#graphite-patterns)
259+
* query: required and may be specified multiple times, in the format described in [Graphite pattern](#graphite-patterns)
224260
* format: json, treejson, completer, pickle, or msgpack. (defaults to json)
225261
* jsonp: true/false: enables jsonp
226262
* from: Graphite from time specification (defaults to now-24hours)

0 commit comments

Comments
 (0)