Exporting the site landing.site.fullExport
Scope:
landingWho can execute the method: user with "export" access permission for sites
The method landing.site.fullExport exports the site and its pages into an array for subsequent import, for example, via landing.demos.register.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
id* |
Site identifier. The site identifier can be obtained using the method landing.site.getList or from the result of the method landing.site.add |
|
params |
Additional export parameters (detailed description) |
Pages within the export are selected in the order of ID ASC and returned in a single response.
Parameter params
Required parameters are marked with *
|
Name |
Description |
|
edit_mode |
Hook export mode. When set to |
|
scope |
Internal scope of the landings. It is not related to the REST scope For |
|
hooks_disable |
Codes of additional fields to be excluded from If the parameter is not provided, an empty array is used. Regardless of the input, the method always additionally excludes |
|
code |
Code of the exported site. If not provided, the current site code is used without leading or trailing Only Latin letters and digits are allowed ( |
|
name |
Name of the site in the export. If not provided, the current site name is used |
|
description |
Description of the site in the export. If not provided, the current site description is used |
|
preview |
URL of the main preview image. Defaults to an empty string |
|
preview2x |
URL of the enlarged preview image. Defaults to an empty string |
|
preview3x |
URL of the retina preview. Defaults to an empty string |
|
preview_url |
URL of the template preview. Defaults to an empty string |
The parameters name, description, preview, preview2x, preview3x, and preview_url apply to the page data only if the site contains a single page. If there are multiple pages, these parameters set the top level of the site export, and the page data is taken from the current values of each page.
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"id": 326,
"params": {
"edit_mode": "Y",
"code": "myfirstsite2026",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview_url": "https://example.com/previews/myfirstsite2026"
}
}' \
"https://**put.your-domain-here**/rest/**user_id**/**webhook_code**/landing.site.fullExport.json"
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"id": 326,
"params": {
"edit_mode": "Y",
"code": "myfirstsite2026",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview_url": "https://example.com/previews/myfirstsite2026"
},
"auth": "**put_access_token_here**"
}' \
"https://**put.your-domain-here**/rest/landing.site.fullExport.json"
try
{
const response = await $b24.callMethod(
'landing.site.fullExport',
{
id: 326,
params: {
edit_mode: 'Y',
code: 'myfirstsite2026',
name: 'Auto Repair Shop',
description: 'Website for auto service',
preview_url: 'https://example.com/previews/myfirstsite2026'
}
}
);
const result = response.getData().result;
console.info(result);
}
catch (error)
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'landing.site.fullExport',
[
'id' => 326,
'params' => [
'edit_mode' => 'Y',
'code' => 'myfirstsite2026',
'name' => 'Auto Repair Shop',
'description' => 'Website for auto service',
'preview_url' => 'https://example.com/previews/myfirstsite2026',
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error exporting site: ' . $e->getMessage();
}
BX24.callMethod(
'landing.site.fullExport',
{
id: 326,
params: {
edit_mode: 'Y',
code: 'myfirstsite2026',
name: 'Auto Repair Shop',
description: 'Website for auto service',
preview_url: 'https://example.com/previews/myfirstsite2026'
}
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'landing.site.fullExport',
[
'id' => 326,
'params' => [
'edit_mode' => 'Y',
'code' => 'myfirstsite2026',
'name' => 'Auto Repair Shop',
'description' => 'Website for auto service',
'preview_url': 'https://example.com/previews/myfirstsite2026',
],
]
);
if (isset($result['error']))
{
echo 'Error: ' . $result['error_description'];
}
else
{
echo '<pre>';
print_r($result['result']);
echo '</pre>';
}
Response Handling
HTTP Status: 200
{
"result": {
"charset": "UTF-8",
"code": "myfirstsite2026",
"site_code": "/dgiy8z1opr/",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview": "",
"preview2x": "",
"preview3x": "",
"preview_url": "https://example.com/previews/myfirstsite2026",
"show_in_list": "Y",
"type": "page",
"version": 3,
"fields": {
"ADDITIONAL_FIELDS": {
"COOKIES_USE": "N",
"B24BUTTON_COLOR": "site",
"BACKGROUND_PICTURE": "https://cdn.com.bitrix24.com/.../15_1x.jpg",
"THEME_USE": "Y"
},
"TITLE": "Auto Repair Shop",
"LANDING_ID_INDEX": "myfirstsite2026",
"LANDING_ID_404": "0"
},
"layout": [],
"folders": [],
"syspages": [],
"items": {
"myfirstsite2026": {
"old_id": "2213",
"code": "myfirstsite2026",
"name": "Auto Repair Shop",
"description": "Website for auto service",
"preview": "",
"preview2x": "",
"preview3x": "",
"preview_url": "https://example.com/previews/myfirstsite2026",
"show_in_list": "Y",
"type": "page",
"version": 3,
"fields": {
"TITLE": "Auto Repair Shop",
"RULE": null,
"ADDITIONAL_FIELDS": {
"B24BUTTON_USE": "N",
"METAOG_TITLE": "Vacation Home in Germany Villa Randu",
"THEME_USE": "N"
}
},
"layout": [],
"items": {
"#block28175": {
"old_id": 28175,
"code": "0.menu_02",
"access": "X",
"anchor": "b2884",
"nodes": {
".landing-block-node-menu-list-item-link": [
{
"href": "#cottages",
"target": "_self",
"text": "Villas"
}
]
},
"style": {
".navbar": [
"navbar navbar-expand-lg p-0 g-px-15 u-navbar-align-right"
]
},
"attrs": {
".navbar-collapse": [
{
"id": "navBar2884"
}
]
}
}
}
}
}
},
"time": {
"start": 1773161828.471138,
"finish": 1773161828.871144,
"duration": 0.4000060558319092,
"processing": 0.10344195365905762,
"date_start": "2026-03-10T19:57:08+02:00",
"date_finish": "2026-03-10T19:57:08+02:00",
"operating_reset_at": 1773162428,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
Fields of the exported site. If the site is not found in the selection or there are no available pages for export, an empty array |
|
|
time |
Information about the execution time of the request |
Object result
|
Name |
Description |
|
charset |
Encoding of the exported set, usually |
|
code |
Code of the site in the export |
|
site_code |
Original site code |
|
name |
Name of the site |
|
description |
Description of the site |
|
preview |
URL of the main preview image |
|
preview2x |
URL of the enlarged preview image |
|
preview3x |
URL of the retina preview |
|
preview_url |
URL of the preview |
|
show_in_list |
Flag for display in the template list |
|
type |
Type of the site in lowercase |
|
version |
Version of the export format. The method returns |
|
fields |
Site fields (detailed description) |
|
Site template data. If the template is not linked, an empty array |
|
|
Groups of pages by folders in the format If there are no folders, |
|
|
System pages in the format If system pages are not defined, |
|
|
items |
Export of the site's pages, where the object key is the page code (detailed description) |
Object fields
|
Name |
Description |
|
Additional fields of the site after filtering by |
|
|
TITLE |
Site title |
|
Code or identifier of the main page |
|
|
Code or identifier of the |
Object layout
|
Name |
Description |
|
code |
XML_ID of the site template |
|
ref |
Codes of pages associated with the site template |
Object items
|
Name |
Description |
|
|
Export of an individual page (detailed description) |
Object page
|
Name |
Description |
|
Original page identifier |
|
|
code |
Page code in the export |
|
name |
Page name |
|
description |
Page description |
|
preview |
URL of the main preview image of the page |
|
preview2x |
URL of the enlarged preview image of the page |
|
preview3x |
URL of the retina preview of the page |
|
preview_url |
URL of the page preview |
|
show_in_list |
Flag for displaying the page |
|
type |
Type of the page site in lowercase |
|
version |
Version of the page export format |
|
fields |
Page fields (detailed description) |
|
Page template data. If the template is not linked, an empty array |
|
|
Page blocks (detailed description) |
Object fields of the page
|
Name |
Description |
|
TITLE |
Page title |
|
RULE |
Page routing rule |
|
Additional fields of the page after filtering by |
Object layout of the page
|
Name |
Description |
|
code |
XML_ID of the page template |
|
ref |
Codes of pages associated with the page template |
Object blocks of the page
|
Name |
Description |
|
|
Export of a page block (detailed description) |
Object block
Fields of the block that do not contain data are removed from the result and may be absent in the object
|
Name |
Description |
|
Original block identifier |
|
|
code |
Block code |
|
access |
Block access level |
|
anchor |
Local anchor of the block |
|
repo_block |
Block data from the repository (detailed description) |
|
cards |
Export of block cards |
|
nodes |
Export of block nodes |
|
menu |
Export of block menu |
|
style |
Export of block styles |
|
attrs |
Export of block attributes |
|
dynamic |
Export of block dynamic parameters |
Object repo_block
|
Name |
Description |
|
app_code |
Code of the source application of the block |
|
xml_id |
XML_ID of the block in the repository |
Error Handling
HTTP Status: 400
{
"error": "SYSTEM_ERROR",
"error_description": "The parameter code can only consist of Latin letters and digits."
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Error Codes
|
Code |
Description |
|
|
Required parameter |
|
|
Insufficient rights to access sites |
|
|
Parameter of incorrect type was provided |
|
|
Internal execution error, for example, |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not allowed to be called using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The methods must be called using the HTTPS protocol |
|
|
|
The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support |
|
|
|
The REST API is available only on commercial plans |
|
|
|
The user whose access token or webhook was used to call the method lacks permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Add Site landing.site.add
- Update Site landing.site.update
- Get the List of Sites landing.site.getList
- Delete Site landing.site.delete
- Register a template in the site creation wizard landing.demos.register