API7 Docs

Get provider portal monitoring data at a single point in time

GET /api/portal/monitor/query

GET /api/portal/monitor/query

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Query Parameters

query*string

Prometheus expression query string.

time?|

Evaluation timestamp. Accepts either a Unix timestamp or an RFC3339 timestamp.

timeout?|

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?integer

Maximum number of returned series. 0 means disabled.

portal_id?string

The unique identifier of the portal instance.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256
Default"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
            ]
          ]
        }
      ]
    }
  }
}
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'