---
title: "查询主题所有文件"
description: "通过主题的唯一标识 ID，查询该主题所有资产文件的信息。"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/asset/get-all-files-for-a-theme'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/asset/get-all-files-for-a-theme.md'
---
# 查询主题所有文件

通过主题的唯一标识 ID，查询该主题所有资产文件的信息。

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_themes`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /themes/:theme_id/assets/list.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `read_themes`

## Request

### Path Parameters

* `theme_id`

  string (required)

  主题的唯一标识 ID。

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `assets`

  array<object>

  主题资产文件信息。

  * `theme_id`

    string

    主题的唯一标识 ID。

  * `updated_at`

    long

    主题资产文件的更新时间，格式为 13 位毫秒级时间戳。

  * `checksum`

    string

    主题资产文件的 MD5 校验值。格式：[MD5](https://en.wikipedia.org/wiki/MD5)。

  * `content_type`

    string

    主题资产文件的 MIME 类型，包括一个类型和子类型，表示文件的类型和格式。格式：[MIME](https://en.wikipedia.org/wiki/Media_type)。

  * `created_at`

    long

    主题资产文件的创建时间，格式为 13 位毫秒级时间戳。

  * `key`

    string

    主题资产文件的名称。

  * `public_url`

    string

    主题资产文件的公开 URL。

  * `size`

    integer

    主题资产文件的大小。单位：字节。


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "查询主题所有文件"
  ],
  "description": "通过主题的唯一标识 ID，查询该主题所有资产文件的信息。",
  "externalDocs": {
    "description": "接口使用的权限点: `read_themes` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "sdYuQblt",
  "parameters": [
    {
      "name": "theme_id",
      "in": "path",
      "description": "主题的唯一标识 ID。",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "theme_id",
        "description": "主题的唯一标识 ID。",
        "type": "string",
        "example": "671f4c96d2682a1f5407536e"
      },
      "example": "671f4c96d2682a1f5407536e",
      "examples": {
        "批量查询主题文件": {
          "value": "6388827102b701028efac460"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "assets": {
                "name": "assets",
                "description": "主题资产文件信息。",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "theme_id": {
                      "name": "theme_id",
                      "description": "主题的唯一标识 ID。",
                      "type": "string",
                      "example": "671f4c96d2682a1f5407536e"
                    },
                    "updated_at": {
                      "name": "updated_at",
                      "description": "主题资产文件的更新时间，格式为 13 位毫秒级时间戳。",
                      "type": "long",
                      "example": 1625688873000
                    },
                    "checksum": {
                      "name": "checksum",
                      "description": "主题资产文件的 MD5 校验值。格式：[MD5](https://en.wikipedia.org/wiki/MD5)。",
                      "type": "string",
                      "example": "21cd91752e4cb57fda60099becd5ce3a224fc7fe62ba7409233a5dc5ab9556ce"
                    },
                    "content_type": {
                      "name": "content_type",
                      "description": "主题资产文件的 MIME 类型，包括一个类型和子类型，表示文件的类型和格式。格式：[MIME](https://en.wikipedia.org/wiki/Media_type)。",
                      "type": "string",
                      "example": "application/json"
                    },
                    "created_at": {
                      "name": "created_at",
                      "description": "主题资产文件的创建时间，格式为 13 位毫秒级时间戳。",
                      "type": "long",
                      "example": 1625688873000
                    },
                    "key": {
                      "name": "key",
                      "description": "主题资产文件的名称。",
                      "type": "string",
                      "example": "config/settings_data.json"
                    },
                    "public_url": {
                      "name": "public_url",
                      "description": "主题资产文件的公开 URL。",
                      "type": "string",
                      "example": "https://cdn-theme.myshopline.com/cdn/shop/prev/example/example/assets/component-blog.css"
                    },
                    "size": {
                      "name": "size",
                      "description": "主题资产文件的大小。单位：字节。",
                      "type": "integer",
                      "example": 204800
                    }
                  },
                  "example": {
                    "public_url": "https://cdn-theme.myshopline.com/cdn/shop/prev/example/example/assets/component-blog.css",
                    "size": 204800,
                    "theme_id": "671f4c96d2682a1f5407536e",
                    "updated_at": 1625688873000,
                    "checksum": "21cd91752e4cb57fda60099becd5ce3a224fc7fe62ba7409233a5dc5ab9556ce",
                    "content_type": "application/json",
                    "created_at": 1625688873000,
                    "key": "config/settings_data.json"
                  }
                },
                "example": [
                  {
                    "updated_at": 1625688873000,
                    "checksum": "21cd91752e4cb57fda60099becd5ce3a224fc7fe62ba7409233a5dc5ab9556ce",
                    "content_type": "application/json",
                    "created_at": 1625688873000,
                    "key": "config/settings_data.json",
                    "public_url": "https://cdn-theme.myshopline.com/cdn/shop/prev/example/example/assets/component-blog.css",
                    "size": 204800,
                    "theme_id": "671f4c96d2682a1f5407536e"
                  }
                ]
              }
            },
            "example": {
              "assets": [
                {
                  "key": "config/settings_data.json",
                  "public_url": "https://cdn-theme.myshopline.com/cdn/shop/prev/example/example/assets/component-blog.css",
                  "size": 204800,
                  "theme_id": "671f4c96d2682a1f5407536e",
                  "updated_at": 1625688873000,
                  "checksum": "21cd91752e4cb57fda60099becd5ce3a224fc7fe62ba7409233a5dc5ab9556ce",
                  "content_type": "application/json",
                  "created_at": 1625688873000
                }
              ]
            }
          },
          "examples": {
            "批量查询主题文件": {
              "description": "批量查询主题文件",
              "value": {
                "body": {
                  "assets": [
                    {
                      "content_type": null,
                      "created_at": 1741766595765,
                      "key": "locales/el.json",
                      "public_url": null,
                      "size": 75484,
                      "theme_id": "67d13fc3d92b88727dcd3755",
                      "updated_at": 1741766595765,
                      "checksum": "4ac7a5b0c9ccc312459a94871432cb9790fe18b028152469c5aefc472404059c"
                    },
                    {
                      "created_at": 1741766595765,
                      "key": "sections/main-password-header.html",
                      "public_url": null,
                      "size": 5354,
                      "theme_id": "67d13fc3d92b88727dcd3755",
                      "updated_at": 1741766595765,
                      "checksum": "fc75290f09111567e20bf5f8665fb5107042e8cc86ada3c71034a7bdb117c3b9",
                      "content_type": null
                    },
                    {
                      "public_url": null,
                      "size": 8424,
                      "theme_id": "67d13fc3d92b88727dcd3755",
                      "updated_at": 1741766595765,
                      "checksum": "9412a387d0e66a40610211e036bc5e5d761a0396d3f7c4c39eb899d9e18ae8b7",
                      "content_type": null,
                      "created_at": 1741766595765,
                      "key": "sections/icon-list.html"
                    },
                    {
                      "key": "layout/password.html",
                      "public_url": null,
                      "size": 3199,
                      "theme_id": "67d13fc3d92b88727dcd3755",
                      "updated_at": 1741766595765,
                      "checksum": "9330e5ad3d053a5f5b2a7c318bc9ce870261c91a547b36ee1bc5c2a660c404a4",
                      "content_type": null,
                      "created_at": 1741766595765
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/themes/:theme_id/assets/list.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "查询主题所有文件",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_themes"
  ]
}
```