DescribePrivateConnectTraffic

1. API Description

This API is used to query private connect bandwidth information in the specified date range.

Note

  • Only the date range of 24 hours are supported.

  • Only the bandwidth information within 30 days are supported to query.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter NameRequiredTypeDescription

privateConnectId

Yes

String

Private connect ID.

startTime

Yes

Start time.

Use UTC time according to the ISO8601 standard. Format: YYYY-MM-DDThh:mm:ssZ.

endTime

No

End time.

Use UTC time according to the ISO8601 standard. Format: YYYY-MM-DDThh:mm:ssZ.

3. Output Parameters

Parameter NameTypeDescription

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

dataList

Array of TrafficData

List of bandwidth data.

in95

Float

Inbound burstable 95th bandwidth.

inAvg

Integer

Average value of inbound bandwidth.

inMax

Integer

Maximum value of inbound bandwidth.

inMin

Integer

Minimum value of inbound bandwidth.

inTotal

Integer

Total data transfer of inbound bandwidth.

out95

Integer

Outbound burstable 95th bandwidth.

outAvg

Integer

Average value of outbound bandwidth.

outMax

Integer

Maximum value of outbound bandwidth.

outMin

Integer

Minimum value of outbound bandwidth.

unit

String

Unit of bandwidth. For example, bps.

4. Code Example

Query the bandwidth information of a private connect in one day.

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

Request:
{
  "privateConnectId": "your-private-connect-id",
  "startTime": "2023-01-01T00:00:00Z",
  "endTime": "2023-01-01T23:59:59Z"
}

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "dataList": [
      {
        "in": 873034,
        "out": 11971,
        "time": "2023-01-01T00:00:00Z"
      },
      {
        "in": 873034,
        "out": 11971,
        "time": "2023-01-01T00:05:00Z"
      },
      {
        "in": 635218,
        "out": 9028,
        "time": "2023-01-01T00:10:00Z"
      }
    ],
    "in95": 873034,
    "inAvg": 793762,
    "inMax": 873034,
    "inMin": 635218,
    "out95": 11971,
    "outAvg": 10990,
    "outMax": 11971,
    "outMin": 9028,
    "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 Code

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

HTTP Status CodeError CodeDescription

404

INVALID_PRIVATE_CONNECT_NOT_FOUND

Private connect does not exist.

403

INVALID_START_TIME_MUST_BEFORE_END_TIME

The start time should be earlier than the end time.

403

INVALID_TIME_RANGE

Invalid date range. The date range should be within 24 hours.

403

TIME_OUT_OF_RANGE

Only the bandwidth information within 30 days are supported to query.

403

INVALID_TIME_FORMAT

Invalid time format.

Last updated