# 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                                                                              | vNic ID(s).                                                                                                |
| name            | No       | String                                                                                       | <p>vNIC name.</p><p>Fuzzy search supported.</p>                                                            |
| regionId        | No       | String                                                                                       | Region ID.                                                                                                 |
| vpcId           | No       | String                                                                                       | ID of VPC.                                                                                                 |
| subnetId        | No       | String                                                                                       | ID of Subnet.                                                                                              |
| instanceId      | No       | String                                                                                       | ID of Instance.                                                                                            |
| status          | No       | [NicStatus](https://docs.console.zenlayer.com/api-reference/compute/datastructure#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](https://docs.console.zenlayer.com/api-reference/compute/datastructure#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](https://docs.console.zenlayer.com/api-reference/compute/datastructure#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](https://docs.console.zenlayer.com/api-reference/compute/datastructure#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](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk)，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).

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