列出网站的自定义组件(内容类型架构)摘要。
按名称排列列出网站的自定义组件(内容类型架构)摘要。仅返回用户定义的自定义架构。
身份验证: API 密钥(x-api-key 请求头或 api_key 查询参数)。
| 参数 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
websiteId | uuid | 是 | 必须是有效的 UUID。此端点不支持 Host/配置回退。 |
state | string | 否 | 按生命周期状态筛选:draft、active 或 archived。 |
api_key | string | 否 | 作为 x-api-key 请求头的替代方案。 |
组件摘要的 JSON 数组:
[
{
"id": "...",
"name": "post",
"displayName": "Post",
"description": "A documentation Post",
"category": "Custom",
"tags": [],
"fields": [],
"icon": null,
"source": "custom",
"version": 8,
"routeSlugField": "title"
}
]
source 始终为 "custom"。displayName 会回退到 name,而 category 在未设置时默认为 "Custom"。
curl '{CMS_API_URL}/components?websiteId=<uuid>&state=active' \
-H 'x-api-key: <key>'
400 — 缺少或无效的 websiteId401 — 无效的 API 密钥