> 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/compute/zec/vpc-network/havip/describehavips.md).

# DescribeHaVips

## 1. API Description

This API (DescribeHaVips) is used to query the details of one or more HaVips.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                            | Description                                                            |
| -------------- | -------- | --------------------------------------------------------------- | ---------------------------------------------------------------------- |
| haVipIds       | No       | Array of String                                                 | List of HaVip IDs. Up to 100 IDs are supported.                        |
| name           | No       | String                                                          | HaVip name. Supports fuzzy search.                                     |
| regionId       | No       | String                                                          | The ID of the node where the HaVip is located.                         |
| vpcIds         | No       | Array of String                                                 | List of VPC IDs.                                                       |
| subnetIds      | No       | Array of String                                                 | List of subnet IDs.                                                    |
| ipAddresses    | No       | Array of String                                                 | List of private IP addresses. Supports up to 100 addresses per query.  |
| instanceIds    | No       | Array of String                                                 | List of instance IDs. Returns HaVips bound to the specified instances. |
| pageSize       | No       | Integer                                                         | <p>Page size.</p><p>Value range: \[1, 1000]</p>                        |
| pageNum        | No       | Integer                                                         | <p>Page number.</p><p>Default value: 1</p>                             |
| tagKeys        | No       | Array of String                                                 | Search by tag keys. Up to 20 tag keys are supported.                   |
| tags           | No       | Array of [Tag](/api-reference/compute/zec/datastructure.md#tag) | Search by tags. Up to 20 tags are supported.                           |

## 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                                                                     | Total number of records meeting the filter conditions.                                                                |
| dataSet        | Array of [HaVipInfo](/api-reference/compute/zec/datastructure.md#havipinfo) | List of HaVip records.                                                                                                |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. List all HaVips.**

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

Request：
{
  "pageNum": 1,
  "pageSize": 20
}

Response：
{
  "requestId": "T12345678-0000-0000-0000-000000000003",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000003",
    "totalCount": 1,
    "dataSet": [
      {
        "haVipId": "havip-xxxxxxxx",
        "name": "my-havip",
        "regionId": "SEA-A",
        "vpcId": "vpc-xxxxxxxx",
        "subnetId": "subnet-xxxxxxxx",
        "securityGroupId": "sg-xxxxxxxx",
        "ipAddress": "10.0.1.100",
        "associatedInstances": ["vm-xxxxxxxx", "vm-yyyyyyyy"],
        "masterInstanceId": "vm-xxxxxxxx",
        "associatedEips": [
          {
            "eipId": "eip-xxxxxxxx",
            "eipAddress": "1.2.3.4"
          },
          {
            "eipId": "eip-yyyyyyyy",
            "eipAddress": "5.6.7.8"
          }
        ],
        "createTime": "2026-01-01T00:00:00Z",
        "tags": []
      }
    ]
  }
}
```

**2. Filter by subnet ID.**

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

Request：
{
  "subnetIds": ["subnet-xxxxxxxx"]
}

Response：
{
  "requestId": "T12345678-0000-0000-0000-000000000004",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000004",
    "totalCount": 1,
    "dataSet": [
      {
        "haVipId": "havip-yyyyyyyy",
        "name": "my-havip-2",
        "regionId": "SEA-A",
        "vpcId": "vpc-xxxxxxxx",
        "subnetId": "subnet-xxxxxxxx",
        "securityGroupId": "sg-xxxxxxxx",
        "ipAddress": "10.0.1.200",
        "associatedInstances": [],
        "masterInstanceId": null,
        "associatedEips": [],
        "createTime": "2026-01-02T00:00:00Z",
        "tags": []
      }
    ]
  }
}
```

**3. Filter by instance ID to find HaVips bound to a specific instance.**

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

Request：
{
  "instanceIds": ["vm-xxxxxxxx"]
}

Response：
{
  "requestId": "T12345678-0000-0000-0000-000000000005",
  "response": {
    "requestId": "T12345678-0000-0000-0000-000000000005",
    "totalCount": 1,
    "dataSet": [
      {
        "haVipId": "havip-xxxxxxxx",
        "name": "my-havip",
        "regionId": "SEA-A",
        "vpcId": "vpc-xxxxxxxx",
        "subnetId": "subnet-xxxxxxxx",
        "securityGroupId": "sg-xxxxxxxx",
        "ipAddress": "10.0.1.100",
        "associatedInstances": ["vm-xxxxxxxx", "vm-yyyyyyyy"],
        "masterInstanceId": "vm-xxxxxxxx",
        "associatedEips": [],
        "createTime": "2026-01-01T00:00:00Z",
        "tags": []
      }
    ]
  }
}
```

{% 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 |
| ---------------- | ---------- | ----------- |
