Get provider portal monitoring data at a single point in time
GET /api/portal/monitor/query
GET /api/portal/monitor/queryInteractive request editor loads with JavaScript.
In: header
Query Parameters
Prometheus expression query string.
Evaluation timestamp. Accepts either a Unix timestamp or an RFC3339 timestamp.
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?query=apisix"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
Get provider portal monitoring data at a single point in time
See Prometheus instant queries for more information.
Parameters
-
query(query, string, required): Prometheus expression query string. -
time(query, object, optional): Evaluation timestamp. Accepts either a Unix timestamp or an RFC3339 timestamp. -
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'