landing.block.getmanifestfile
Получить файл манифеста блока
Описание
Метод landing.block.getmanifestfile возвращает исходный манифест блока из файлового репозитория.
В отличие от landing.block.getmanifest, метод возвращает манифест в исходном виде — так, как он указан в файле .description.php. Он не добавляет служебные поля, например code, preview, timestamp.
Параметры
code
string
обязательный
Код блока из файлового репозитория.
Можно передать короткий код, например 01.big_with_text. Тогда метод будет искать блок только в пространстве имен bitrix и автоматически добавит префикс bitrix:.
Если нужен блок из другого пространства имен, передайте полный код в формате <namespace>:<code>.
В коде можно использовать только латинские буквы, цифры и символы . _ - :
Примеры запроса
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"code": "01.big_with_text"
}' \
"https://**put.your-domain-here**/rest/**user_id**/**webhook_code**/landing.block.getmanifestfile.json"
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"code": "01.big_with_text",
"auth": "**put_access_token_here**"
}' \
"https://**put.your-domain-here**/rest/landing.block.getmanifestfile.json"
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
// Shape of the payload returned in result (match the "response handling" section of the page)
type ManifestFileResult = {
block?: Record<string, unknown>
cards?: Record<string, unknown>
nodes?: Record<string, unknown>
style?: Record<string, unknown>
attrs?: Record<string, unknown>
assets?: Record<string, unknown>
menu?: Record<string, unknown>
}
try {
const response = await $b24.actions.v2.call.make<ManifestFileResult>({
method: 'landing.block.getmanifestfile',
params: {
code: '01.big_with_text',
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info(result.block, result.nodes)
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function getManifestFile() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'landing.block.getmanifestfile',
params: {
code: '01.big_with_text',
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info(result.block, result.nodes)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getManifestFile)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.landing.block.getmanifestfile(
code="01.big_with_text",
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Ошибка Bitrix API",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Ошибка Bitrix SDK: {error.message}")
except Exception as error:
print(f"Непредвиденная ошибка: {error}")
try {
$response = $b24Service
->core
->call(
'landing.block.getmanifestfile',
[
'code' => '01.big_with_text',
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . var_export($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting block manifest file: ' . $e->getMessage();
}
BX24.callMethod(
'landing.block.getmanifestfile',
{
code: '01.big_with_text'
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'landing.block.getmanifestfile',
[
'code' => '01.big_with_text',
]
);
if (isset($result['error']))
{
echo 'Ошибка: ' . $result['error_description'];
}
else
{
echo '<pre>';
print_r($result['result']);
echo '</pre>';
}
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "landing.block.getmanifestfile", b24.Params{
"code": "01.big_with_text",
})
if err != nil {
return fmt.Errorf("landing.block.getmanifestfile: %w", err)
}
keys, ok := b24.Keys(res.Result)
if !ok {
return fmt.Errorf("ожидался объект в ответе")
}
fmt.Println("полей в ответе:", len(keys))
Ответ
HTTP-статус: 200
{
"result": {
"block": {
"name": "Обложка с меняющимися на фоне картинками",
"section": [
"cover"
],
"dynamic": false
},
"cards": {
".landing-block-card-img": {
"name": "Фоновая картинка",
"label": [
".landing-block-card-img"
]
}
},
"nodes": {
".landing-block-node-small-title": {
"name": "Подзаголовок",
"type": "text"
},
".landing-block-node-title": {
"name": "Заголовок",
"type": "text"
},
".landing-block-node-text": {
"name": "Текст",
"type": "text"
},
".landing-block-node-button": {
"name": "Кнопка",
"type": "link"
},
".landing-block-card-img": {
"name": "Фоновая картинка",
"type": "img",
"dimensions": {
"width": 1920,
"height": 1080
},
"allowInlineEdit": false,
"useInDesigner": false,
"create2xByDefault": false
}
},
"style": {
"block": {
"type": [
"display"
],
"additional": {
"name": "Слайдер",
"attrsType": [
"autoplay",
"autoplay-speed",
"pause-hover",
"dots"
]
}
},
"nodes": {
".landing-block-node-text-container": {
"title": "Набор элементов",
"type": [
"background-color",
"animation"
]
},
".landing-block-node-small-title": {
"title": "Подзаголовок",
"type": [
"typo",
"heading"
]
},
".landing-block-node-title": {
"title": "Заголовок",
"type": [
"typo",
"heading"
]
},
".landing-block-node-text": {
"title": "Текст",
"type": "typo"
},
".landing-block-node-button": {
"title": "Кнопка",
"type": "button"
},
".landing-block-card-img": {
"name": "Фоновая картинка",
"type": [
"background-overlay",
"height-vh"
]
}
}
},
"assets": {
"ext": [
"landing_carousel"
]
}
},
"time": {
"start": 1774521452,
"finish": 1774521452.955493,
"duration": 0.9554929733276367,
"processing": 0,
"date_start": "2026-03-26T13:37:32+03:00",
"date_finish": "2026-03-26T13:37:32+03:00",
"operating_reset_at": 1774522052,
"operating": 0
}
}
Возвращаемые данные
result
object
Исходный манифест блока из файлового репозитория.
Общий формат файла манифеста описан в статье Файл манифеста.
Если блок не найден, код содержит недопустимые символы или передан код локального репозиторного блока вида repo_<ID>, метод вернет пустой массив [] без ошибки
time
time
Информация о времени выполнения запроса
Обработка ошибок
HTTP-статус: 400
{
"error": "MISSING_PARAMS",
"error_description": "Недостаточно параметров вызова, пропущены: code"
}
| Код | Описание | Значение |
|---|---|---|
MISSING_PARAMS |
Не передан обязательный параметр code |
|
ACCESS_DENIED |
Доступ запрещен: у пользователя нет доступа к разделу «Сайты и магазины» |

