Evaluates an instant query at a single point in time using POST
POST/v1/metrics/prometheus/api/v1/query
Submit query data in the request body using URL-encoded form parameters. Please ensure to change the region in the URL to match your account's region.
Request
- application/x-www-form-urlencoded
Body
required
query stringrequired
Prometheus expression query string.
time string
Evaluation timestamp as an RFC3339 or Unix timestamp. Optional.
timeout string
Evaluation timeout. Defaults to the value of the -query.timeout flag.
Responses
- 200
- 400
- 500
Successful query evaluation.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
status string
Status of the query (e.g., success, fail).
data object
resultType string
Possible values: [matrix
, vector
, scalar
, string
]
Type of the result.
result object[]
metric objectrequired
Labels identifying the metric.
property name* string
value string[]required
Possible values: >= 2
, <= 2
The actual data point returned by the query, with timestamp and value.
{
"status": "string",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {},
"value": [
"string"
]
}
]
}
}
Invalid request parameters.
Internal server error.
Loading...