Get provider portal monitoring data over a range of time
GET /api/portal/monitor/query_range
GET /api/portal/monitor/query_rangeInteractive request editor loads with JavaScript.
In: header
Query Parameters
Prometheus expression query string.
Start timestamp, inclusive. Accepts either a Unix timestamp or an RFC3339 timestamp.
End timestamp, inclusive. Accepts either a Unix timestamp or an RFC3339 timestamp.
Query resolution step width, either as:
- a float number in seconds (e.g.
15.5), or - a duration string (e.g.
15s,1m,2h) in Prometheus-style duration format.
Evaluation timeout, either as:
- A float number in seconds (e.g.
2.5) - A duration string (e.g.
5s,1.5m) in Prometheus-style format.
Maximum number of returned series. 0 means disabled.
The unique identifier of the portal instance.
^[a-zA-Z0-9-_.]+$1 <= length <= 256"default"Response Body
application/json
curl -X GET "$API_BASE_URL/api/portal/monitor/query_range?query=apisix&start=1718531400&end=1718531400&step=15.5"The Prometheus proxy response.
{
"value": {
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"label": "xxx"
},
"values": [
[
1684740675,
1
],
[
1684740690,
2
]
]
}
]
}
}
}Invalid arguments. Error details will be provided in the response.
Complete operation details and schema variants
GET /api/portal/monitor/query_range
Get provider portal monitoring data over a range of time
See Prometheus range queries for more information.
Parameters
-
query(query, string, required): Prometheus expression query string. -
start(query, object, required): Start timestamp, inclusive. Accepts either a Unix timestamp or an RFC3339 timestamp. -
end(query, object, required): End timestamp, inclusive. Accepts either a Unix timestamp or an RFC3339 timestamp. -
step(query, object, required): Query resolution step width, either as: -
a float number in seconds (e.g.
15.5), or -
a duration string (e.g.
15s,1m,2h) in Prometheus-style duration format. -
timeout(query, object, optional): Evaluation timeout, either as: -
A float number in seconds (e.g.
2.5) -
A duration string (e.g.
5s,1.5m) in Prometheus-style format. -
limit(query, integer, optional): Maximum number of returned series. 0 means disabled. -
portal_id(query, string, optional): The unique identifier of the portal instance.
Responses
200: The Prometheus proxy response.- allOf variant 1
value(object, optional): The specific resource.- allOf variant 2
value(object, optional): The Prometheus raw data.400: Invalid arguments. Error details will be provided in the response.
cURL
curl -X GET '$API_BASE_URL/api/portal/monitor/query_range'