**版本：202601**

# 查询主题文件树

**GET** `/openapi/2026-01/themes/:theme_id/doctree`

获取指定主题的文件树结构。

## 请求

**Path参数**

- `theme_id` string (required)

  主题 ID

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `layouts` object[]

    布局列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]
  - `templates` object[]

    模板列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]
  - `sections` object[]

    Section（区块）文件列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]
  - `snippets` object[]

    片段列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]
  - `assets` object[]

    资产列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]
  - `configs` object[]

    配置列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]
  - `locales` object[]

    语言环境列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]
  - `blocks` object[]

    Block（区块内的块）文件列表，每个对象包含文件唯一标识和路径

    *   Array \[

    - `id` string

      文件 ID
    - `location` string

      文件路径或位置
    *   \]

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "layouts": [
      {
        "id": "string",
        "location": "string"
      }
    ],
    "templates": [
      {
        "id": "string",
        "location": "string"
      }
    ],
    "sections": [
      {
        "id": "string",
        "location": "string"
      }
    ],
    "snippets": [
      {
        "id": "string",
        "location": "string"
      }
    ],
    "assets": [
      {
        "id": "string",
        "location": "string"
      }
    ],
    "configs": [
      {
        "id": "string",
        "location": "string"
      }
    ],
    "locales": [
      {
        "id": "string",
        "location": "string"
      }
    ],
    "blocks": [
      {
        "id": "string",
        "location": "string"
      }
    ]
  }
}
```
