# DescribeDomains

## 1. API Description

This interface is used to query information about multiple accelerated domain names. Users can query based on conditions such as ID or name.

## 2. Request Parameters

The following request parameter list includes only the necessary parameters for the interface

| Parameter Name       | Required | Type            | Description                                                                                        |
| -------------------- | -------- | --------------- | -------------------------------------------------------------------------------------------------- |
| domainIds            | No       | Array of String | <p>Accelerated domain IDs.</p><p>Supports up to 100 IDs for querying.</p>                          |
| domainName           | No       | String          | Accelerated domain name                                                                            |
| domainStatus         | No       | String          | [Accelerated domain status](/api-reference/networking/cdn/datastructure.md#domainstatusvalue)      |
| configStatus         | No       | String          | [Domain configuration status](/api-reference/networking/cdn/datastructure.md#configstatusvalue)    |
| accelerationRegionId | No       | String          | [Acceleration region ID](/api-reference/networking/cdn/datastructure.md#region)                    |
| businessTypeId       | No       | String          | [Business type ID](/api-reference/networking/cdn/datastructure.md#region)                          |
| resourceGroupId      | No       | String          | <p>Resource group ID.</p><p>If not provided, returns instances in all visible resource groups.</p> |
| pageSize             | No       | Integer         | <p>Size of the returned page.</p><p>Defaults to 20, maximum is 1000.</p>                           |
| pageNum              | No       | Integer         | <p>Page number of the returned data.</p><p>Defaults to 1.</p>                                      |

## 3. Output Parameters

| Parameter Name | Type                                                                             | Description                                                                                 |
| -------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| requestId      | String                                                                           | Unique request ID, returned with each request. Provide this requestId when locating issues. |
| totalCount     | Integer                                                                          | Total number of data that meets the conditions.                                             |
| dataSet        | Array of [DomainInfo](/api-reference/networking/cdn/datastructure.md#domaininfo) | Result set.                                                                                 |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}

1. **Paginate through the list of accelerated domains**

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

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

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "totalCount": 6,
    "dataSet": [
          {
            "domainId": "domainIdxxxxx",
            "businessType": "LF",
            "domainName": "cdntest.zenlayer.com",
            "domainStatus": "DEPLOYED",
            "configStatus": "ENABLED",
            "cname": "xxx.zga.globalconnetct.com",
            "createTime": "2023-04-28T03:38:53Z",
            "resourceGroupId":"xxx-xx"
          }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. 错误码

The following includes error codes encountered in business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).


---

# 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/networking/cdn/domain/describedomains.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.
