> 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/platform-service/zrm/resource/describeresources.md). Agents can also search and read this documentation through its [MCP server](https://docs.console.zenlayer.com/api-reference/~gitbook/mcp).

# DescribeResources

## 1. API Description

This API (DescribeResources) is used to search all resources under the current team by resource ID or resource name.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                                                                      | Description                                                                              |
| --------------- | -------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| pageNum         | No       | Integer                                                                                                   | <p>Page number. Default: 1.</p><p>Default value: 1</p>                                   |
| pageSize        | No       | Integer                                                                                                   | <p>Number of items per page. Default: 20.</p><p>Default value: 20</p>                    |
| resourceIds     | No       | Array of String                                                                                           | List of resource IDs. Exact match. Multiple IDs are combined with OR.                    |
| resourceName    | No       | String                                                                                                    | Resource name. Fuzzy match.                                                              |
| resourceGroupId | No       | String                                                                                                    | List of resource group IDs. Exact match. If left empty, all resource groups are queried. |
| tags            | No       | Array of [Tag](https://docs.console.zenlayer.com/api-reference/platform-service/zrm/datastructure.md#tag) | List of tags.                                                                            |
| tagKeys         | No       | Array of String                                                                                           | List of tag keys.                                                                        |

## 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 resources meeting the filtering conditions.                                                                 |
| dataSet        | Array of [ResourceSearchInfo](https://docs.console.zenlayer.com/api-reference/platform-service/zrm/datastructure.md#resourcesearchinfo) | List of resources.                                                                                                    |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Search resources**

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

Request：
{
  "pageNum": 1,
  "pageSize": 20,
  "resourceIds": [
    "123456789012345678"
  ],
  "resourceName": "web-server"
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "totalCount": 1,
    "dataSet": [
      {
        "resourceId": "<resourceId>",
        "name": "web-server-hk-01",
        "resourceType": "BMC_INSTANCE",
        "createTime": "2026-08-20 10:30:00",
        "resourceGroupId": "<resourceGroupId>",
        "resourceGroupName": "Test",
        "location": "SEL-A",
        "service": "BMC"
      }
    ]
  }
}
```

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