profound-logoProfound CMS
⌘K
Admin
Theme
DocsTutorialBlogPhilosophy
DocsTutorialBlogPhilosophy

Hybrid

Collection of Pages with ComponentsTypes of ComponentsSetup server sent events (SSE) content refetchInstall Profound CMS as a proxyCEL Scripting in Template BuilderProject ScaffoldingMedia Library

Headless

Quick startJSON 与 Claude 代码组件 Zod 拉取

REST API

REST API 概览get连接网站 APIgetGET /routesgetGET /routegetGET /blocksget获取带有 CEL 缓存的区块getGET /blocks/generatedgetGET /componentsgetGET /components/{name}getGET /dataset/{schema_name}get获取内容变更 SSEpatchPATCH /dataset/{schema_name}postPOST /translationpatchPATCH /translationsgetGET /usagepostPOST /csvpatch修补 CSV
All Systems Operational
Powered Byprofound-logo
Theme

GET /blocks

按请求顺序通过 ID 获取区块,并解析图像引用。

根据 ID 为某个网站获取区块,并将图像引用解析为 URL。区块将按请求中的 ids 顺序返回;未知的 ID 将被静默跳过。

认证: API 密钥(x-api-key 请求头或 api_key 查询参数)。

查询参数

参数类型必填说明
websiteIduuid否目标网站;回退到 Host 请求头/配置。
idsstring否用逗号分隔的区块 UUID。为空或缺失时 → []。
api_keystring否x-api-key 请求头的替代方案。

响应

区块的 JSON 数组:

[
  {
    "id": "...",
    "website_id": "...",
    "schema_id": "...",
    "draft_content": {},
    "published_content": {},
    "state": "published",
    "version": 3,
    "schema_name": "hero-block",
    "layout": {},
    "cloned_from_id": null,
    "created_at": "2026-06-23T18:34:16Z",
    "updated_at": "2026-06-23T20:36:55Z"
  }
]

示例

curl '{CMS_API_URL}/blocks?websiteId=<uuid>&ids=<id1>,<id2>' \
  -H 'x-api-key: <key>'

错误

  • 400 — ids 中的 UUID 无效,或网站无法解析
  • 401 — API 密钥无效
Continue Reading
Previous‹GET /routeNext获取带有 CEL 缓存的区块›