> 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/sdn/internet/describeinternets.md).

# DescribeInternets

## 1. API Description

This API (DescribeInternets) is used to queries the Internet list.

{% hint style="info" %}
**BGP tier**

* For instances with `routingType=BGP`, `bgp.tier` returns the BGP tier (`STANDARD` or `PREMIUM`). Existing instances created before the tier split uniformly return `PREMIUM`.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                                                     | Description                                                                                                                   |
| --------------- | -------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| internetIds     | No       | Array of String                                                                          | <p>List of Internet IDs.</p><p>Up to 100 IDs can be queried.</p>                                                              |
| internetName    | No       | String                                                                                   | <p>Internet name.</p><p>Fuzzy match.</p>                                                                                      |
| resourceGroupId | No       | String                                                                                   | <p>Resource group ID.</p><p>If not specified, Internet instances in all resource groups visible to the user are returned.</p> |
| peerPortId      | No       | String                                                                                   | <p>Port ID.</p><p>Use this field to filter Internet instances associated with the specified port.</p>                         |
| internetDcId    | No       | String                                                                                   | <p>Data center ID.</p><p>You can call DescribeDataCenters to get the latest data center list.</p>                             |
| pageSize        | No       | Integer                                                                                  | <p>Number of results per page.</p><p>Default: 20. Maximum: 1000.</p>                                                          |
| pageNum         | No       | Integer                                                                                  | <p>Page number of the returned pages.</p><p>Default: 1.</p><p>Default value: 1</p>                                            |
| tagKeys         | No       | Array of String                                                                          | <p>Filter by tag keys.</p><p>Maximum: 20 tags.</p>                                                                            |
| tags            | No       | Array of [Tag](https://docs.console.zenlayer.com/api-reference/sdn/datastructure.md#tag) | <p>Filter by tags.</p><p>Maximum: 20 tags.</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                                                                                            | Total number of data meeting the conditions.                                                                          |
| dataSet        | Array of [Internet](https://docs.console.zenlayer.com/api-reference/sdn/datastructure.md#internet) | Internet result set.                                                                                                  |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query the list of single-link Internet instances.**

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

Request:
{
    "internetIds": ["your-internet-id"]
}

Response:
{
    "requestId": "TEC2801F6-9FB4-4DE2-8BCD-1C59655495C5",
    "response": {
        "requestId": "TEC2801F6-9FB4-4DE2-8BCD-1C59655495C5",
        "totalCount": 1,
        "dataSet": [
            {
                "internetId": "your-internet-id",
                "internetName": "MIA1-10G",
                "internetDescription": "test_internet_desc",
                "dataCenter": {
                    "dcId": "822b9bd9-44f0-4279-a64d-568f5bc4a77b",
                    "dcName": "Equinix AM3",
                    "cityName": "Amsterdam",
                    "countryName": "Netherlands",
                    "areaName": "Europe"
                },
                "peerPortId": "your-port-id",
                "peerPortName": "MIA1-10G",
                "peerDataCenter": {
                    "dcId": "40eb37d8-0f65-4108-bd2c-a2577498f6eb",
                    "dcName": "Coresite LA2",
                    "cityName": "Los Angeles",
                    "countryName": "United States",
                    "areaName": "North America"
                },
                "deliveryType": "Manual",
                "resourceGroupId": "your-resource-group-id",
                "resourceGroupName": "Default Resource Group",
                "createTime": "2024-01-01T00:00:00Z",
                "routingType": "Static",
                "internetType": "ByBandwidth",
                "bandwidth": 50,
                "commitBandwidth": 50,
                "bfd": { "bfdRxInterval": 100, "bfdTxInterval": 100, "bfdMultiplier": 10 },
                "bgp": null,
                "interconnect": { "vendorIpv4Address": null, "customerIpv4Address": null, "vendorIpv6Address": null, "customerIpv6Address": null },
                "privateConnectId": "your-vll-id",
                "privateConnectName": "PrivateConnect-Los Angeles-Amsterdam",
                "publicIpv4Addresses": [
                    {
                        "ipAddress": "192.0.2.0/25",
                        "netmask": 25,
                        "gatewayIpAddress": "192.0.2.1"
                    }
                ],
                "internetStatus": "RUNNING",
                "connectivityStatus": "ACTIVE",
                "publicIpAddresses": [
                    {
                        "ipUuid": "your-ip-uuid",
                        "ipAddress": "192.0.2.0/25",
                        "netmask": 25,
                        "gatewayIpAddress": "192.0.2.1",
                        "ipType": "IPV4",
                        "ipNetworkType": "BGP_IP"
                    }
                ],
                "haMode": null,
                "zbgRegionId": null,
                "haLinks": null,
                "peerPortType": "PORT"
            }
        ]
    }
}
```

**2. Query a high-availability (ACTIVE\_STANDBY) Internet. The response contains details of both sub-links.**

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

Request:
{
    "internetIds": ["your-ha-internet-id"]
}

Response:
{
    "requestId": "TEC2801F6-9FB4-4DE2-8BCD-1C59655495C6",
    "response": {
        "requestId": "TEC2801F6-9FB4-4DE2-8BCD-1C59655495C6",
        "totalCount": 1,
        "dataSet": [
            {
                "internetId": "your-ha-internet-id",
                "internetName": "HA-Internet-AMS1",
                "dataCenter": {
                    "dcId": "822b9bd9-44f0-4279-a64d-568f5bc4a77b",
                    "dcName": "Equinix AM3",
                    "cityName": "Amsterdam",
                    "countryName": "Netherlands",
                    "areaName": "Europe"
                },
                "routingType": "BGP",
                "internetType": "ByBandwidth",
                "bandwidth": 100,
                "internetStatus": "RUNNING",
                "connectivityStatus": "ACTIVE",
                "publicIpAddresses": [
                    {
                        "ipUuid": "your-ip-uuid",
                        "ipAddress": "192.0.2.0/28",
                        "netmask": 28,
                        "ipType": "IPV4",
                        "ipNetworkType": "BGP_IP"
                    }
                ],
                "haMode": "ACTIVE_STANDBY",
                "haLinks": [
                    {
                        "isPrimary": true,
                        "internetStatus": "RUNNING",
                        "connectivityStatus": "ACTIVE",
                        "privateConnectId": "vll-child-a-uuid",
                        "privateConnectName": "HA-VLL-A",
                        "peerPortId": "port-a-uuid",
                        "peerPortName": "AMS1-10G-1",
                        "peerDataCenter": {
                            "dcId": "40eb37d8-0f65-4108-bd2c-a2577498f6eb",
                            "dcName": "Coresite LA2",
                            "cityName": "Los Angeles",
                            "countryName": "United States",
                            "areaName": "North America"
                        },
                        "peerPortVlan": 100,
                        "interconnect": {
                            "vendorIpv4Address": "10.0.0.1/30",
                            "customerIpv4Address": "10.0.0.2/30"
                        }
                    },
                    {
                        "isPrimary": false,
                        "internetStatus": "RUNNING",
                        "connectivityStatus": "ACTIVE",
                        "privateConnectId": "vll-child-b-uuid",
                        "privateConnectName": "HA-VLL-B",
                        "peerPortId": "port-b-uuid",
                        "peerPortName": "AMS1-10G-2",
                        "peerDataCenter": {
                            "dcId": "40eb37d8-0f65-4108-bd2c-a2577498f6eb",
                            "dcName": "Coresite LA2",
                            "cityName": "Los Angeles",
                            "countryName": "United States",
                            "areaName": "North America"
                        },
                        "peerPortVlan": 200,
                        "interconnect": {
                            "vendorIpv4Address": "10.0.1.1/30",
                            "customerIpv4Address": "10.0.1.2/30"
                        }
                    }
                ],
                "peerPortType": "PORT"
            }
        ]
    }
}
```

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