# DescribeEipTraffic

## 1. API Description

This API (DescribeEipTraffic) is used to query the traffic monitoring data of the specified elastic IP within a given time range. Supports data aggregation by statistical granularity (step) and filtering by outbound public IP.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type    | Description                                                                                                          |
| -------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
| eipId          | Yes      | String  | ID of the elastic IP.                                                                                                |
| startTime      | Yes      | String  | <p>Start time.</p><p>Use UTC time according to the ISO8601 standard. Format: YYYY-MM-ddTHH:mm:ssZ .</p>              |
| endTime        | Yes      | String  | <p>End time.</p><p>Use UTC time according to the ISO8601 standard. Format: YYYY-MM-ddTHH:mm:ssZ .</p>                |
| step           | No       | Integer | <p>Time duration.</p><p>Default value: 5 minutes;</p><p>Supported values: 1 or 5 minutes.</p><p>Default value: 5</p> |
| wanIp          | No       | String  | If the IP is a 3-in-1 elastic IP, the value is required.                                                             |

## 3. Output Parameters

| Parameter Name | Type                                                                                  | Description                                                                                                           |
| -------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| dataList       | Array of [EipTrafficData](/api-reference/compute/zec/datastructure.md#eiptrafficdata) | List of bandwidth data.                                                                                               |
| in95           | Integer                                                                               | 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.                                                                                  |
| outTotal       | Integer                                                                               | Total data transfer of outbound bandwidth.                                                                            |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the traffic of an elastic IP in a specified time range.**

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

Request:
{
  "eipId": "926368879272403391",
  "startTime": "2023-07-11T08:00:011Z",
  "endTime": "2023-07-11T08:10:00Z"
}

Response:
{
  "requestId": "TE1375F34-6DC9-4BED-BDF2-DC9D07E4D3A6",
  "response": {
    "requestId": "TE1375F34-6DC9-4BED-BDF2-DC9D07E4D3A6",
    "dataList": [
      {
        "internetRX": 109096,
        "internetTX": 80,
        "time": "2023-07-11T08:05:00Z"
      },
      {
        "internetRX": 106680,
        "internetTX": 56,
        "time": "2023-07-11T08:10:00Z"
      }
    ],
    "in95": 109096,
    "inAvg": 107888,
    "inMax": 109096,
    "inMin": 106680,
    "inTotal": 8091600,
    "out95": 80,
    "outAvg": 68,
    "outMax": 80,
    "outMin": 56,
    "outTotal": 5100,
    "totalUnit": "B",
    "unit": "bps"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，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](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/compute/zec/elastic-ip/describeeiptraffic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
