# DescribeNetworkInterfaces

## 1. API Description

This API (DescribeNetworkInterfaces) is used to query the information of one or more specified vNICs. Users can search for vNIC information based on vNIC ID, vNIC name, etc.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                               | Description                                                                                                |
| --------------- | -------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| nicIds          | No       | Array of String                                                    | <p>Filter by vNIC ID(s).</p><p>Up to 100 IDs can be specified per request.</p>                             |
| name            | No       | String                                                             | <p>vNIC name.</p><p>Fuzzy search supported.</p>                                                            |
| regionId        | No       | String                                                             | Region ID.                                                                                                 |
| vpcId           | No       | String                                                             | Filter by the VPC ID that the network interface belongs to.                                                |
| subnetId        | No       | String                                                             | ID of Subnet.                                                                                              |
| instanceId      | No       | String                                                             | ID of Instance.                                                                                            |
| status          | No       | [NicStatus](/api-reference/compute/zec/datastructure.md#nicstatus) | vNIC state.                                                                                                |
| pageSize        | No       | Integer                                                            | <p>Number of items in the current page result.</p><p>Default value: 20 ;</p><p>Value range: \[1, 1000]</p> |
| pageNum         | No       | Integer                                                            | <p>Number of pages returned.</p><p>Value range: \[1, +)</p><p>Default value: 1</p>                         |
| nicType         | No       | [NicType](/api-reference/compute/zec/datastructure.md#nictype)     | vNIC type.                                                                                                 |
| resourceGroupId | No       | String                                                             | Resource Group ID.                                                                                         |
| securityGroupId | No       | String                                                             | Filter by the security group ID to which the network interface belongs.                                    |
| tagKeys         | No       | Array of String                                                    | <p>Query using tag keys.</p><p>A maximum of 20 tag keys can be used.</p>                                   |
| tags            | No       | Array of [Tag](/api-reference/compute/zec/datastructure.md#tag)    | <p>Query using tags.</p><p>A maximum of 20 tags can be used.</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> |
| totalCount     | Integer                                                                 | Number of vNICs meeting the filtering conditions.                                                                     |
| dataSet        | Array of [NicInfo](/api-reference/compute/zec/datastructure.md#nicinfo) | Information on vNIC(s).                                                                                               |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the list of secondary vNICs.**

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

Request：
{
  "nicType": "Secondary",
  "pageSize": 1,
  "pageNum": 1
}

Response：
{
  "requestId": "T33CFA599-AD4E-4B7E-9F56-A0D39857E91F",
  "response": {
      "requestId": "T33CFA599-AD4E-4B7E-9F56-A0D39857E91F",
      "totalCount": 1,
      "dataSet": [
          {
              "subnetId": "<subnetId>",
              "resourceGroup": {
                  "resourceGroupName": "Default Resource Group",
                  "resourceGroupId": "<resourceGroupId>"
              },
              "primaryIpv4": "10.130.0.2",
              "privateIpList": ["10.130.0.2","fd9c:d016:1eb2:2:0:2::2"],
              "nicSubnetType": "IPv4_IPv6",
              "updateTime": "2025-07-29T09:59:16Z",
              "primaryIpv6": "fd9c:d016:1eb2:2:0:2::2",
              "publicIpList": ["128.0.0.2","128.0.0.3"],
              "securityGroupId": "<securityGroupId>",
              "ipv6Cidr": "fd9c:d016:1eb2:2:0:2::/96",
              "macAddress": "52:54:xx:xx:xx:10",
              "instanceId": null,
              "regionId": "asia-east-1",
              "createTime": "2025-07-29T09:59:16Z",
              "nicType": "Secondary",
              "vpcId": "<vpcId>",
              "name": "Elastic-NIC-asia-east-1-1",
              "nicId": "1511370676722866275",
              "status": "AVAILABLE",
              "secondaryIpv4s": [],
              "tags":null
          }
      ]
  }
}
```

{% 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/vnic/describenetworkinterfaces.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.
