> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/zec/elastic-ip/describeeipnewconnsmonitordata.md).

# DescribeEipNewConnsMonitorData

## 1. API Description

This API (DescribeEipNewConnsMonitorData) is used to query the connections per second (CPS, All/In/Out) monitoring data of an elastic IP within a period of time. You can also pass an instance ID to query the aggregated data of all EIPs under it.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                                   | Description                                                                                                                                                                                                                    |
| -------------- | -------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| metricType     | Yes      | [EipNewConnsMeta](/api-reference/zec/datastructure.md#eipnewconnsmeta) | Type of the connections per second monitoring metric.                                                                                                                                                                          |
| startTime      | Yes      | String                                                                 | <p>Start time.</p><p>Format: YYYY-MM-ddTHH<span data-gb-custom-inline data-tag="emoji" data-code="1f1f2-1f1f2">🇲🇲</span>ssZ .</p>                                                                                            |
| endTime        | Yes      | String                                                                 | <p>The query end time.</p><p>Time format: yyyy-MM-ddTHH<span data-gb-custom-inline data-tag="emoji" data-code="1f1f2-1f1f2">🇲🇲</span>ssZ.</p>                                                                                |
| eipId          | No       | String                                                                 | <p>Unique ID of the EIP.</p><p>EIPs whose network type is PathBasedBandwidthIP do not support querying this metric and an error is returned.</p><p>Specify either eipId or instanceId.</p>                                     |
| instanceId     | No       | String                                                                 | <p>Instance ID.</p><p>It queries the aggregated data of all IPv4 EIPs bound to this instance (IPv6 excluded, and EIPs of the PathBasedBandwidthIP type excluded).</p><p>Specify either eipId or instanceId.</p>                |
| step           | No       | Integer                                                                | <p>Interval between the queried data points.</p><p>Unit: minutes.</p><p>Supported values: 1, 5, 15, 60, 360, 1440, and 10080.</p><p>When the value is 1, the query time span cannot exceed 6 hours.</p><p>Default value: 5</p> |

## 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> |
| allMaxValue    | Float                                                                       | Maximum value of the All (inbound + outbound) data points.                                                            |
| allMinValue    | Float                                                                       | Minimum value of the All (inbound + outbound) data points.                                                            |
| allAvgValue    | Float                                                                       | Average value of the All (inbound + outbound) data points.                                                            |
| inMaxValue     | Float                                                                       | Maximum value of the In (inbound) data points.                                                                        |
| inMinValue     | Float                                                                       | Minimum value of the In (inbound) data points.                                                                        |
| inAvgValue     | Float                                                                       | Average value of the In (inbound) data points.                                                                        |
| outMaxValue    | Float                                                                       | Maximum value of the Out (outbound) data points.                                                                      |
| outMinValue    | Float                                                                       | Minimum value of the Out (outbound) data points.                                                                      |
| outAvgValue    | Float                                                                       | Average value of the Out (outbound) data points.                                                                      |
| dataList       | Array of [NewConnsValue](/api-reference/zec/datastructure.md#newconnsvalue) | Information on performance data.                                                                                      |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query the connections per second (CPS) metric of a single EIP.**

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

Request:
{
    "eipId": "< EipId >",
    "metricType": "NEW_CONNECTIONS",
    "startTime": "2026-09-16T01:55:00Z",
    "endTime": "2026-09-16T07:55:00Z"
}

Response:
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "allMaxValue": 1.2,
    "allMinValue": 1.2,
    "allAvgValue": 1.2,
    "inMaxValue": 1.2,
    "inMinValue": 1.2,
    "inAvgValue": 1.2,
    "outMaxValue": 1.2,
    "outMinValue": 1.2,
    "outAvgValue": 1.2,
    "dataList": [
      {
        "time": "2026-09-16T01:55:00Z",
        "allValue": 1.2,
        "inValue": 1.2,
        "outValue": 1.2
      }
    ]
  }
}
```

**2. Query the aggregated new connections data of all IPv4 EIPs under an instance (IPv6 excluded).**

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

Request:
{
    "instanceId": "< InstanceId >",
    "metricType": "NEW_CONNECTIONS",
    "startTime": "2026-09-16T01:55:00Z",
    "endTime": "2026-09-16T07:55:00Z",
    "step": 60
}

Response:
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "allMaxValue": 1.2,
    "allMinValue": 1.2,
    "allAvgValue": 1.2,
    "inMaxValue": 1.2,
    "inMinValue": 1.2,
    "inAvgValue": 1.2,
    "outMaxValue": 1.2,
    "outMinValue": 1.2,
    "outAvgValue": 1.2,
    "dataList": [
      {
        "time": "2026-09-16T01:55:00Z",
        "allValue": 1.2,
        "inValue": 1.2,
        "outValue": 1.2
      }
    ]
  }
}
```

{% 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                                                                    |
| ---------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| 400              | INVALID\_TIME\_RANGE                                         | The query time range is invalid.                                               |
| 400              | INVALID\_MONITOR\_TIME\_RANGE\_EXCEED\_STEP\_LIMIT           | The selected time range exceeds the upper limit for the current interval.      |
| 404              | INVALID\_EIP\_NOT\_FOUND                                     | Elastic IP does not exist.                                                     |
| 404              | INVALID\_INSTANCE\_NOT\_FOUND                                | Instance not found.                                                            |
| 400              | OPERATION\_DENIED\_EIP\_NETWORK\_TYPE\_NOT\_SUPPORT\_MONITOR | The network type of this EIP does not support querying this monitoring metric. |
