Add entity.section.add storage section
We are still updating this page
Some data may be missing — we will fill it in shortly
Scope:
entityWho can execute the method: any user
The entity.section.add method adds a storage section. The user must have at least write access permission (W) in the storage.
Parameters
|
Parameter |
Description |
|
ENTITY* |
Required. String identifier of the storage. |
|
NAME* |
Required. Name of the section. |
|
DESCRIPTION |
Description of the section. |
|
ACTIVE |
Flag indicating if the section is active (Y|N). |
|
SORT |
Sorting parameter for the section. |
|
PICTURE |
Picture of the section. |
|
DETAIL_PICTURE |
Detailed picture of the section. |
|
SECTION |
Identifier of the parent section. |
Required parameters are marked with *
Examples
try
{
const response = await $b24.callMethod(
'entity.section.add',
{
ENTITY: 'menu_new',
'NAME': 'Test Section'
}
);
const result = response.getData().result;
}
catch( error )
{
console.error('Error:', error);
}
try {
$response = $b24Service
->core
->call(
'entity.section.add',
[
'ENTITY' => 'menu_new',
'NAME' => 'Test Section',
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error adding entity section: ' . $e->getMessage();
}
BX24.callMethod(
'entity.section.add',
{
ENTITY: 'menu_new',
'NAME': 'Test Section'
}
);
https://my.bitrix24.com/rest/entity.section.add.json?ENTITY=menu_new&NAME=Test%20Section&auth=9affe382af74d9c5caa588e28096e872
How to Use Examples in Documentation
Response on success
200 OK
{"result":220}