save_component
Create or update a reusable component. content may be a document object or a JSON string of that document. contentMode replace writes that document instead of the default sparse merge. A block saved without props.id receives one. Put named dataRequests, inputSchema, and editor variables on content.root.props (not top-level). Shape: dataRequests[{name,op:list|get|create|update|delete|updateMatching,objectTypeId,args?,select?,resultWrites?}]. Tokens {{var:id}} / {{bind:route.*}}. Prefer save_component_preset for list/detail/form starters. The response includes revisionId, versionId, and revisionNo. Docs: design/shared-concepts/data-requests.
save_component · Grup: design
Create or update a reusable component. content may be a document object or a JSON string of that document. contentMode replace writes that document instead of the default sparse merge. A block saved without props.id receives one. Put named dataRequests, inputSchema, and editor variables on content.root.props (not top-level). Shape: dataRequests[{name,op:list|get|create|update|delete|updateMatching,objectTypeId,args?,select?,resultWrites?}]. Tokens {{var:id}} / {{bind:route.*}}. Prefer save_component_preset for list/detail/form starters. The response includes revisionId, versionId, and revisionNo. Docs: design/shared-concepts/data-requests.
Girdiler
| Field | Required | Notes |
|---|---|---|
websiteId | required | |
componentId | optional | |
label | optional | |
content | optional | |
contentMode | optional | merge (default) updates listed blocks by id and keeps the rest. replace writes this content as the whole document. |
ops | optional | |
contentLocale | optional | |
response | optional | |
dryRun | optional | |
previewToken | optional |
Eşlendiği uçlar
POST /api/v1/{locale}/{websiteId}/components→ APIPUT /api/v1/{locale}/{websiteId}/components/{id}→ API