> 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/nat-gateway/describenatgatewaynewconnsmonitordata.md).

# DescribeNatGatewayNewConnsMonitorData

## 1. API Description

This API (DescribeNatGatewayNewConnsMonitorData) is used to query the connections per second (CPS, All/In/Out) monitoring data of a NAT gateway within a period of time.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                                                                                  | Description                                                                                                                                                                          |
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| natGatewayId   | Yes      | String                                                                                                                | <p>NAT gateway ID.</p><p>It can be obtained by calling <a href="https://docs.console.zenlayer.com/api-reference/zec/nat-gateway/describenatgateways.md">DescribeNatGateways</a>.</p> |
| metricType     | Yes      | [NatGatewayNewConnsMeta](https://docs.console.zenlayer.com/api-reference/zec/datastructure.md#natgatewaynewconnsmeta) | Type of the connections per second monitoring metric.                                                                                                                                |
| startTime      | Yes      | String                                                                                                                | <p>The query start time.</p><p>Time 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>                                      |
| 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>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 [NatNewConnsValue](https://docs.console.zenlayer.com/api-reference/zec/datastructure.md#natnewconnsvalue) | Information on performance data.                                                                                      |

## 4. Code Example

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

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

Request:
{
    "natGatewayId": "<natGatewayId>",
    "metricType": "NEW_CONNECTIONS",
    "startTime": "2026-09-24T01:55:00Z",
    "endTime": "2026-09-24T07: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-24T01:55:00Z",
        "allValue": 1.2,
        "inValue": 1.2,
        "outValue": 1.2
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/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](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code               | Description                      |
| ---------------- | ------------------------ | -------------------------------- |
| 400              | INVALID\_TIME\_RANGE     | The query time range is invalid. |
| 404              | INVALID\_NAT\_NOT\_FOUND | NAT gateway does not exist.      |
