|
|
|
@ -74,6 +74,7 @@ The following endpoint evaluates an instant query at a single point in time: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
GET /api/v1/query |
|
|
|
|
POST /api/v1/query |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
URL query parameters: |
|
|
|
@ -85,6 +86,10 @@ URL query parameters: |
|
|
|
|
|
|
|
|
|
The current server time is used if the `time` parameter is omitted. |
|
|
|
|
|
|
|
|
|
You can URL-encode these parameters directly in the request body by using the `POST` method and |
|
|
|
|
`Content-Type: application/x-www-form-urlencoded` header. This is useful when specifying a large |
|
|
|
|
or dynamic number of series selectors that may breach server-side URL character limits. |
|
|
|
|
|
|
|
|
|
The `data` section of the query result has the following format: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
@ -135,6 +140,7 @@ The following endpoint evaluates an expression query over a range of time: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
GET /api/v1/query_range |
|
|
|
|
POST /api/v1/query_range |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
URL query parameters: |
|
|
|
@ -146,6 +152,10 @@ URL query parameters: |
|
|
|
|
- `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and |
|
|
|
|
is capped by the value of the `-query.timeout` flag. |
|
|
|
|
|
|
|
|
|
You can URL-encode these parameters directly in the request body by using the `POST` method and |
|
|
|
|
`Content-Type: application/x-www-form-urlencoded` header. This is useful when specifying a large |
|
|
|
|
or dynamic number of series selectors that may breach server-side URL character limits. |
|
|
|
|
|
|
|
|
|
The `data` section of the query result has the following format: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
@ -205,6 +215,7 @@ The following endpoint returns the list of time series that match a certain labe |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
GET /api/v1/series |
|
|
|
|
POST /api/v1/series |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
URL query parameters: |
|
|
|
@ -214,6 +225,10 @@ URL query parameters: |
|
|
|
|
- `start=<rfc3339 | unix_timestamp>`: Start timestamp. |
|
|
|
|
- `end=<rfc3339 | unix_timestamp>`: End timestamp. |
|
|
|
|
|
|
|
|
|
You can URL-encode these parameters directly in the request body by using the `POST` method and |
|
|
|
|
`Content-Type: application/x-www-form-urlencoded` header. This is useful when specifying a large |
|
|
|
|
or dynamic number of series selectors that may breach server-side URL character limits. |
|
|
|
|
|
|
|
|
|
The `data` section of the query result consists of a list of objects that |
|
|
|
|
contain the label name/value pairs which identify each series. |
|
|
|
|
|
|
|
|
@ -221,7 +236,7 @@ The following example returns all series that match either of the selectors |
|
|
|
|
`up` or `process_start_time_seconds{job="prometheus"}`: |
|
|
|
|
|
|
|
|
|
```json |
|
|
|
|
$ curl -g 'http://localhost:9090/api/v1/series?match[]=up&match[]=process_start_time_seconds{job="prometheus"}' |
|
|
|
|
$ curl -g 'http://localhost:9090/api/v1/series?' --data-urlencode='match[]=up' --data-urlencode='match[]=process_start_time_seconds{job="prometheus"}' |
|
|
|
|
{ |
|
|
|
|
"status" : "success", |
|
|
|
|
"data" : [ |
|
|
|
|