Get storage parameters or list of all storages entity.get
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.get method retrieves the storage parameters or a list of all application storages.
Parameters
|
Parameter |
Description |
|
ENTITY |
String identifier of the required storage. |
Required parameters are marked with *
Examples
JS
PHP
BX24.js
HTTP
try
{
const response = await $b24.callMethod('entity.get');
const result = response.getData().result;
console.log(result);
}
catch( error )
{
console.error('Error:', error);
}
try {
$response = $b24Service
->core
->call(
'entity.get',
[]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error calling entity.get: ' . $e->getMessage();
}
BX24.callMethod('entity.get');
https://my.bitrix24.com/rest/entity.get.json?auth=59efe32d01c0e9dc5732e8dfa68a4baa
Example of correctly retrieving a list of all available storages:
JS
PHP
BX24.js
try
{
const response = await $b24.callMethod(
'entity.get',
{}
);
const result = response.getData().result;
console.info('List of created storages:', result);
}
catch( error )
{
console.error('Error:', error);
}
try {
$response = $b24Service
->core
->call(
'entity.get',
[]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
error_log($result->error());
echo 'Error: ' . $result->error();
} else {
echo 'List of created storages: ' . print_r($result->data(), true);
}
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error calling entity.get: ' . $e->getMessage();
}
BX24.callMethod(
"entity.get",
{},
function(result)
{
if(result.error())
console.error(result.error());
else
{
console.info("List of created storages:", result.data());
}
}
);
How to Use Examples in Documentation
Response in case of success
200 OK
{"result":
[
{
"ENTITY":"dish",
"NAME":"Dishes"
},
{
"ENTITY":"menu",
"NAME":"Menu"
}
]
}
Copied
Previous