QueryDataMultiple

Prev Next

Available in Classic and VPC

Get multiple time-series data collected by Cloud Insight.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /cw_fea/real/cw/api/data/query/multiple

Request headers

For information about the headers common to all Cloud Insight APIs, see Cloud Insight request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
timeStart Integer Required Query start date and time (millisecond)
  • Unix timestamp format
timeEnd Integer Required Query end date and time (millisecond)
  • Unix timestamp format
metricInfoList Array Required Query conditions
  • Up to 20 conditions can be queried in a single call.
Note

When entering a request body, see the following:

  • If the aggregation function (aggregation) configured when registering the schema and the aggregation of the data query request do not match, the data cannot be retrieved.
  • The recommended query period (timeEnd~timeStart) varies depending on the data aggregation interval (interval). For more information, see Recommended query period by data aggregation interval.

Request example

The request example is as follows:

curl --location --request POST 'https://cw.apigw.ntruss.com/cw_fea/real/cw/api/data/query/multiple' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--data '{
  "metricInfoList": [
    {
      "aggregation": "AVG",
      "dimensions": {
        "instanceNo": "**********"
      },
      "interval": "Min1",
      "metric": "avg_cpu_used_rto",
      "prodKey": "**********"
    },
    {
      "aggregation": "AVG",
      "dimensions": {
        "instanceNo": "**********"
      },
      "interval": "Min1",
      "metric": "avg_read_byt_cnt",
      "prodKey": "**********"
    }
  ],
  "timeEnd": **********,
  "timeStart": **********
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
aggregation String - Aggregation function
  • COUNT | SUM | MAX | MIN | AVG
dimensions Object - Dimension information
dimensions.instanceNo String - Instance number
dps Array - Query result
  • Display in the data point (Unix timestamp format) and data value format.
interval String - Aggregation interval
  • Min1 | Min5 | Min30 | Hour2 | Day1
metric String - Metric name
productName String - Product name

Response status codes

For information about the HTTP status codes common to NAVER Cloud Platform, see Cloud Insight API response status codes.

Response example

The response example is as follows:

[
    {
        "aggregation": "AVG",
        "dimensions": {
            "instanceNo": "**********"
        },
        "dps": [
            [
                1733184480000,
                0.3678916
            ],
            [
                1733184540000,
                0.33438668
            ],
            [
                1733184600000,
                0.32612613
            ],
            [
                1733184660000,
                0.32586497
            ],
            [
                1733184720000,
                0.30105397
            ]
        ],
        "interval": "Min1",
        "metric": "avg_cpu_used_rto",
        "productName": "Server(VPC)"
    },
    {
        "aggregation": "AVG",
        "dimensions": {
            "instanceNo": "**********"
        },
        "dps": [
            [
                1733184480000,
                24029.867
            ],
            [
                1733184540000,
                13107.2
            ],
            [
                1733184600000,
                13721.6
            ],
            [
                1733184660000,
                13107.2
            ],
            [
                1733184720000,
                13107.2
            ]
        ],
        "interval": "Min1",
        "metric": "avg_read_byt_cnt",
        "productName": "Server(VPC)"
    }
]