Get the List of Sites landing.site.getList
Scope:
landingWho can execute the method: user with "view" access permission for sites
The method landing.site.getList retrieves a list of sites based on selection parameters.
Warning
By default, only sites with DELETED = "N" are included in the selection. To retrieve deleted sites, pass DELETED or =DELETED in the filter.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
scope |
Internal scope of landings. It is not related to the REST scope For |
|
params |
Parameters for selecting sites (detailed description) |
Parameter params
|
Name |
Description |
|
select |
List of fields to select from basic site fields. If the parameter is not provided or is not an array, |
|
filter |
Filter by fields from basic site fields. If the parameter is not provided or is not an array, an empty filter If the Exact filtering by type works only for a single value that is allowed in the current internal |
|
order |
Sorting in the format |
|
group |
Grouping in ORM format. If not an array, the parameter is converted to an empty array. When filtering by access permissions, |
|
limit |
Limit on the number of rows in the selection at the ORM level. By default, it is not set. |
|
offset |
Offset for the selection at the ORM level. If the parameter is not provided, the default ORM behavior is applied. |
TYPE and scope Correspondence
Site types and rules for selecting the scope parameter are described in the article Working with Site Types and Scopes.
The table below applies to params.filter.TYPE and params.filter.=TYPE.
|
params.filter.TYPE |
scope in request |
When to use |
|
|
do not pass |
Selection of sites and stores in the standard |
|
|
|
Selection of group sites |
|
|
|
Selection of knowledge bases |
|
|
|
Selection of the main page or vibe |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"params": {
"select": [
"ID",
"TITLE",
"TYPE"
],
"filter": {
"=DELETED": "N"
},
"order": {
"ID": "DESC"
}
}
}' \
"https://**put.your-domain-here**/rest/**user_id**/**webhook_code**/landing.site.getList.json"
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"params": {
"select": [
"ID",
"TITLE",
"TYPE"
],
"filter": {
"=DELETED": "N"
},
"order": {
"ID": "DESC"
}
},
"auth": "**put_access_token_here**"
}' \
"https://**put.your-domain-here**/rest/landing.site.getList.json"
try
{
const response = await $b24.callMethod(
'landing.site.getList',
{
params: {
select: [
'ID',
'TITLE',
'TYPE'
],
filter: {
'=DELETED': 'N'
},
order: {
ID: 'DESC'
}
}
}
);
const result = response.getData();
console.info(result.result);
}
catch (error)
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'landing.site.getList',
[
'params' => [
'select' => [
'ID',
'TITLE',
'TYPE',
],
'filter' => [
'=DELETED' => 'N',
],
'order' => [
'ID' => 'DESC',
],
]
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting site list: ' . $e->getMessage();
}
BX24.callMethod(
'landing.site.getList',
{
params: {
select: [
'ID',
'TITLE',
'TYPE'
],
filter: {
'=DELETED': 'N'
},
order: {
ID: 'DESC'
}
}
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'landing.site.getList',
[
'params' => [
'select' => [
'ID',
'TITLE',
'TYPE',
],
'filter' => [
'=DELETED' => 'N',
],
'order' => [
'ID' => 'DESC',
],
]
]
);
echo '<pre>';
print_r($result);
echo '</pre>';
Response Handling
HTTP Status: 200
{
"result": [
{
"ID": "157",
"TITLE": "Randu Villa",
"TYPE": "PAGE"
},
{
"ID": "147",
"TITLE": "Test Test yesss",
"TYPE": "STORE"
},
{
"ID": "3",
"TITLE": "Fork Museum",
"TYPE": "PAGE"
}
],
"time": {
"start": 1773269838,
"finish": 1773269838.647153,
"duration": 0.6471529006958008,
"processing": 0,
"date_start": "2026-03-12T01:57:18+01:00",
"date_finish": "2026-03-12T01:57:18+01:00",
"operating_reset_at": 1773270438,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
List of sites (detailed description). The method may return |
|
time |
Information about the execution time of the request. |
Site Object
|
Name |
Description |
|
ID |
Site identifier. This field is always present in the response. |
|
TYPE |
Site type. This field is always present in the response. |
|
DOMAIN_NAME |
Site domain, returned when selecting the |
|
PUBLIC_URL |
Public URL of the site, returned when selecting the It may be an empty string if the URL could not be determined. |
|
PREVIEW_PICTURE |
URL of the preview of the main page of the site, returned when selecting the |
|
PHONE |
Company phone from CRM, returned when selecting the |
|
DATE_CREATE |
Creation date in string format, returned when selecting the |
|
DATE_MODIFY |
Modification date in string format, returned when selecting the |
|
LANDING_ID_INDEX |
May be present if |
Error Handling
HTTP Status: 400
{
"error": "ACCESS_DENIED",
"error_description": "Access denied"
}
|
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 |
|
|
Insufficient permissions to call landing methods. |
|
|
Data type error in method call parameters. |
|
|
Internal error during method execution. |
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
- Delete Site landing.site.delete
- Get Public URL of the Site landing.site.getPublicUrl
- Get Site Folders landing.site.getFolders