note.collection.list
Получить список баз знаний
Описание
Метод относится к REST 3.0. Особенности вызова и формат ответа новой версии API описаны в обзоре REST 3.0.
Метод note.collection.list возвращает список доступных пользователю баз знаний.
Параметры
pagination
object
необязательный
Объект постраничной навигации. Описание структуры объекта
Параметр pagination
limit
integer
необязательный
Размер страницы.
Допустимые значения: от 1 до 200
По умолчанию: 50
afterCursor
object
необязательный
Курсор следующей страницы. Передавайте значение nextCursor из предыдущего ответа. Описание структуры объекта
Параметр afterCursor
position
integer
обязательный
Значение поля position последней базы знаний из предыдущей страницы.
Обязателен, если задан afterCursor
id
integer
обязательный
Идентификатор последней базы знаний из предыдущей страницы.
Обязателен, если задан afterCursor
Примеры запроса
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"pagination":{"limit":50,"afterCursor":{"position":100,"id":42}}}' \
https://**put_your_bitrix24_address**/rest/api/**put_your_user_id_here**/**put_your_webhook_here**/note.collection.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"pagination":{"limit":50,"afterCursor":{"position":100,"id":42}},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/api/note.collection.list
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame, ISODate } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
type CollectionListResult = {
items: Array<{
id: number
name: string
position: number
policyLevel: string
createdBy: number
updatedBy: number
createdAt: ISODate
updatedAt: ISODate
}>
nextCursor: {
position: number
id: number
} | null
}
try {
const response = await $b24.actions.v3.call.make<CollectionListResult>({
method: 'note.collection.list',
params: {
pagination: {
limit: 50,
afterCursor: {
position: 100,
id: 42,
},
},
},
requestId: Text.getUuidRfc4122()
})
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info('Collections:', result.items.length, result.nextCursor)
}
} catch (error) {
console.error(error)
}
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function listCollections() {
try {
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v3.call.make({
method: 'note.collection.list',
params: {
pagination: {
limit: 50,
afterCursor: {
position: 100,
id: 42,
},
},
},
requestId: B24Js.Text.getUuidRfc4122()
})
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info('Collections:', result.items.length, result.nextCursor)
} catch (error) {
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', listCollections)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
pagination = {
"limit": 50,
"afterCursor": {
"position": 100,
"id": 42,
},
}
try:
bitrix_response = client.note.collection.list(
pagination=pagination,
).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(
'note.collection.list',
[
'pagination' => [
'limit' => 50,
'afterCursor' => [
'position' => 100,
'id' => 42,
],
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error listing collections: ' . $e->getMessage();
}
BX24.callMethod(
'note.collection.list',
{
pagination: {
limit: 50,
afterCursor: {
position: 100,
id: 42
}
}
},
function(result){
console.info(result.data());
console.log(result);
}
);
require_once('crest.php');
$result = CRest::call(
'note.collection.list',
[
'pagination' => [
'limit' => 50,
'afterCursor' => [
'position' => 100,
'id' => 42,
],
],
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "note.collection.list", b24.Params{
"pagination": b24.Params{
"limit": 50,
"afterCursor": b24.Params{
"position": 100,
"id": 42,
},
},
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("note.collection.list: %w", err)
}
// Форма ответа показана ниже на этой странице.
fmt.Printf("%s\n", res.Result)
Ответ
HTTP-статус: 200
{
"result": {
"items": [
{
"id": 1,
"name": "Продуктовая документация",
"position": 100,
"policyLevel": "view",
"createdBy": 1,
"updatedBy": 1,
"createdAt": "2026-04-20T12:00:00Z",
"updatedAt": "2026-04-21T09:15:30Z"
}
],
"nextCursor": {
"position": 100,
"id": 1
}
},
"time": {
"start": 1780639200,
"finish": 1780639200.224321,
"duration": 0.2243211269378662,
"processing": 0.18721413612365723,
"date_start": "2026-06-19T10:00:00+03:00",
"date_finish": "2026-06-19T10:00:00+03:00",
"operating_reset_at": 1780639800,
"operating": 0
}
}
Возвращаемые данные
result
object
Объект со списком баз знаний
items
array
Список баз знаний, доступных пользователю
items[]
object
Объект базы знаний
id
integer
Идентификатор базы знаний
name
string
Название базы знаний
position
integer
Позиция базы знаний в общем списке
policyLevel
string
Базовая политика доступа базы знаний.
Возможные значения:
none— нет доступаview— просмотрmanage— редактированиеmoderate— администрирование
createdBy
integer
Идентификатор автора базы знаний
updatedBy
integer
Идентификатор последнего редактора базы знаний
createdAt
datetime
Дата и время создания базы знаний в UTC
updatedAt
datetime
Дата и время последнего изменения базы знаний в UTC
nextCursor
object
Курсор следующей страницы или null, если страниц больше нет
time
time
Информация о времени выполнения запроса
Обработка ошибок
HTTP-статус: 403
{
"error": {
"code": "BITRIX_REST_V3_EXCEPTION_ACCESSDENIEDEXCEPTION",
"message": "Доступ запрещен"
}
}
| Код | Описание | Значение |
|---|---|---|
Поле |
Описание ошибки | Как исправить |
| — | Доступ запрещен | У пользователя нет доступа к модулю База знаний |

