DescribeInstanceTraffic

DescribeInstanceTraffic

1. API Description

This API is used to query the data transfer in the specified date range.

Note

  • The date range of 24 hours are supported.

  • Only the data transfer within 30 days are supported to query.

2. Input Parameters

The following request parameter list only provides API request parameters.

3. Output Parameters

4. Code Example

Query the data transfer of the instance in one day.

POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeInstanceTraffic
<Common Request Params>

Request:
{
  "instanceId": "932237369560662463",
  "startTime": "2023-07-11T06:50:36Z",
  "endTime": "2023-07-11T07:10:36Z"
}

Response:
{
  "requestId": "T6F6F4A31-EAEE-45DD-ABB2-78A4196E3743",
  "response": {
    "requestId": "T6F6F4A31-EAEE-45DD-ABB2-78A4196E3743",
    "dataList": [
      {
        "internetRX": "144056",
        "internetTX": "2936",
        "time": "2023-07-11T06:55:00Z"
      },
      {
        "internetRX": "107104",
        "internetTX": "2568",
        "time": "2023-07-11T07:00:00Z"
      },
      {
        "internetRX": "93448",
        "internetTX": "3880",
        "time": "2023-07-11T07:05:00Z"
      },
      {
        "internetRX": "106504",
        "internetTX": "5800",
        "time": "2023-07-11T07:10:00Z"
      }
    ],
    "in95": "144056",
    "in95Time": "2023-07-11T06:55:00Z",
    "inAvg": "112778",
    "inMax": "144056",
    "inMin": "93448",
    "inTotal": "16916700",
    "out95": "5800",
    "out95Time": "2023-07-11T07:10:00Z",
    "outAvg": "3796",
    "outMax": "5800",
    "outMin": "2568",
    "outTotal": "569400",
    "maxBandwidth95ValueMbps": "0.14",
    "totalUnit": "B",
    "unit": "bps"
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.​

Last updated