> 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/networking/sdn/cloud-router/describecloudrouters.md).

# DescribeCloudRouters

## 1. API Description

This API (DescribeCloudRouters) is used to query Cloud Routers

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name    | Required | Type                                                                            | Description                                                                                     |
| ----------------- | -------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| cloudRouterIds    | No       | Array of String                                                                 | List of Cloud Router IDs, up to 100.                                                            |
| cloudRouterName   | No       | String                                                                          | Cloud Router name. Supports fuzzy matching.                                                     |
| cloudRouterStatus | No       | [BusinessStatus](/api-reference/networking/sdn/datastructure.md#businessstatus) | Cloud Router status.                                                                            |
| edgePointId       | No       | String                                                                          | Edge point ID.                                                                                  |
| resourceGroupId   | No       | String                                                                          | Resource group ID. If not specified, Cloud Routers in all visible resource groups are returned. |
| pageSize          | No       | Integer                                                                         | Page size to return. Default: 20, maximum: 1000.                                                |
| pageNum           | No       | Integer                                                                         | <p>Page number to return. Default: 1.</p><p>Default value: 1</p>                                |
| tagKeys           | No       | Array of String                                                                 | <p>Search by tag keys.</p><p>Up to 20 tag keys.</p>                                             |
| tags              | No       | Array of [Tag](/api-reference/networking/sdn/datastructure.md#tag)              | <p>Search by tags.</p><p>Up to 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 Cloud Routers matching the criteria.                                                                  |
| dataSet        | Array of [CloudRouter](/api-reference/networking/sdn/datastructure.md#cloudrouter) | List of Cloud Routers.                                                                                                |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Get the list of Cloud Routers.**

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

Request:
{}

Response:
{   
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
     "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E",
     "dataSet": [
        {
            "resourceGroupName":"Default Resource Group",
            "cloudRouterStatus":"RUNNING",
            "edgePoints":[
                {
                    "dataCenter":{
                        "dcId":"LAX5",
                        "cityName":"Los Angeles",
                        "areaName":"North America",
                        "dcName":"DRT",
                        "dcAddress":"600 West 7th Street Los Angeles, CA 90017",
                        "countryName":"United States"
                    },
                    "edgePointType":"PORT",
                    "ipAddress":"4.4.4.4/24",
                    "portId":"your-portId",
                    "edgePointId":"the edge point id",
                    "bgpConnection":{
                        "password":"",
                        "peerIpAddress":"4.4.4.3",
                        "localAsn":62610,
                        "peerAsn":6543
                    },
                    "createTime":"2023-10-27T07:14:46Z",
                    "edgePointName":"LAX5-1698390478681",
                    "connectivityStatus":"DOWN",
                    "bandwidthMbps":1
                },
                {
                    "dataCenter":{
                        "dcId":"SOF1",
                        "cityName":"Sofia",
                        "areaName":"Europe",
                        "dcName":"Equinix_SO2",
                        "dcAddress":"N33 Nedelcho Bonchev str, Sofia, Bulgaria",
                        "countryName":"Bulgaria"
                    },
                    "edgePointType":"PORT",
                    "vlanId":1061,
                    "ipAddress":"5.5.5.5/24",
                    "portId":"your port id",
                    "edgePointId":"the edge point id",
                    "bgpConnection":{
                        "password":"",
                        "peerIpAddress":"5.5.5.4",
                        "localAsn":62610,
                        "peerAsn":3456
                    },
                    "createTime":"2023-10-27T07:14:46Z",
                    "edgePointName":"SOF1-1698391290880",
                    "connectivityStatus":"DOWN",
                    "bandwidthMbps":1
                }
            ],
            "createTime":"2023-10-27T07:14:46Z",
            "cloudRouterId":"cloud-router-id",
            "resourceGroupId":"c91db3f4-b15e-4323-9a12-fd3f0330b74b",
            "cloudRouterName":"Test",
            "connectivityStatus":"ABNORMAL",
            "cloudRouterDescription":"",
            "expiredTime":null,
            "recycledTime":null,
            "period":null,
            "source":"CONSOLE",
            "tags":{
                "tags":[
                    {"key":"env","value":"prod"}
                ]
            }
        }
     ],
     "totalCount": 1
  }
}
```

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