Create reusable component
Create reusable component (named dataRequests on content.root.props)
Yöntem: POST · Kimlik doğrulama: bearer · Grup: design
/api/v1/{locale}/{websiteId}/components
İstek
Content-Type: application/json
{ "label": "string", "contentLocale": "tr-TR", "content": { "root": { "props": { "title": "…", "variables": [{ "id": "q", "name": "Search", "type": "text" }], "dataRequests": [{ "name": "searchX", "op": "list", "objectTypeId": "uuid", "args": { "searchQuery": "{{var:q}}" }, "resultWrites": [{ "variableId": "hits", "source": "results" }] }], "inputSchema": [] } }, "content": [] } }Şema
{
"method": "POST",
"path": "/api/v1/{locale}/{websiteId}/components",
"contentType": "application/json",
"bodyHint": "{ \"label\": \"string\", \"contentLocale\": \"tr-TR\", \"content\": { \"root\": { \"props\": { \"title\": \"…\", \"variables\": [{ \"id\": \"q\", \"name\": \"Search\", \"type\": \"text\" }], \"dataRequests\": [{ \"name\": \"searchX\", \"op\": \"list\", \"objectTypeId\": \"uuid\", \"args\": { \"searchQuery\": \"{{var:q}}\" }, \"resultWrites\": [{ \"variableId\": \"hits\", \"source\": \"results\" }] }], \"inputSchema\": [] } }, \"content\": [] } }"
}MCP araçları
- save_component — Save component