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 /components/{name}

根据名称获取单个自定义组件的完整字段定义。

根据名称获取单个自定义组件的完整定义,包括其字段列表。

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

路径参数

参数类型必填说明
namestring是架构名称,例如 post。

查询参数

参数类型必填说明
websiteIduuid是必须是有效的 UUID。
api_keystring否x-api-key 请求头的替代方案。

响应

{
  "id": "...",
  "name": "post",
  "displayName": "文章",
  "description": "一篇文档文章",
  "category": "自定义",
  "titleField": "title",
  "routeSlugField": "title",
  "icon": null,
  "fields": [
    { "name": "title", "type": "string", "required": true }
  ],
  "slugFields": ["title", "description"],
  "version": 8
}

slugFields 是计算得出的——所有字符串类型字段的名称。

示例

curl '{CMS_API_URL}/components/post?websiteId=<uuid>' \
  -H 'x-api-key: <key>'

错误

  • 400 — 缺少或无效的 websiteId
  • 401 — 无效的 API 密钥
  • 404 — 未找到架构
Continue Reading
Previous‹GET /componentsNextGET /dataset/{schema_name}›