SitePageBlockTypes/Details
Один тип блока по id: шаблон, стили, скрипт, данные по умолчанию и описание полей панели свойств. По нему собирается блок для SitePages/Set.
CLI
python limetime.py block-type <id>
<id> — номер типа из block-types
HTTP
Запрос
GET /v3/SitePageBlockTypes/Details?id=1023 HTTP/1.1
Host: api.limetime.io
X-Access-Key: 7f3a9b2c1d4e5f60718293a4b5c6d7e8
Accept: application/jsonОтвет
HTTP/1.1 200 OK
Content-Type: application/json
{
"isSuccess": true,
"message": null,
"data": {
"id": 1023,
"displayName": "Документы",
"groupName": "Документы",
"isModificator": false,
"orderPriority": 1,
"configuration": {
"ui": {
"paddingTop": 2,
"paddingBottom": 2
},
"defaultData": {
"title": "Документы",
"documents": []
},
"controls": {
"general": {
"fields": [
{
"type": "text",
"binding": "title",
"display": "Заголовок"
}
],
"collections": [
{
"binding": "documents",
"displayName": "Документы",
"fields": [
{
"type": "text",
"binding": "title",
"display": "Название"
},
{
"type": "file",
"binding": "url",
"display": "Файл"
}
]
}
]
},
"shortcuts": [],
"editors": []
},
"wrapWith": null
},
"template": "<div class=\"documents\">…</div>",
"css": "…",
"js": ""
}
}Как собрать блок из типа
typeId=idтипаdata= копияconfiguration.defaultDataс вашими правкамиpaddingTop,paddingBottom— изconfiguration.uiisModificator— из типа;children— пустой массив у обычных блоковid— любое уникальное число в пределах страницы
Ошибка block type not found — типа с таким id нет.
Подробное руководство по страницам и блокам — файл PAGES.md в комплекте CLI (см. ИИ-агенты).