Получить базу данных
Получить данные о базе данных
Функция ПолучитьБазуДанных(Знач Токен, Знач База) Экспорт
Параметр | CLI опция | Тип | Обяз. | Назначение |
---|---|---|---|---|
Токен | --token | Строка | ✔ | Токен |
База | --base | Строка | ✔ | ID базы данных |
Возвращаемое значение: Соответствие Из КлючИЗначение - сериализованный JSON ответа от Notion
Пример использования для 1С:Предприятие/OneScript
Токен = "secret_9RsfMrRMqZwqp0Zl0B...";
База = "26182aa7-fc4e-81e3-a3fa-c7dd1bd496ea";
Результат = OPI_Notion.ПолучитьБазуДанных(Токен, База);
- Bash
- CMD/Bat
oint notion ПолучитьБазуДанных \
--token *** \
--base "26982aa7-fc4e-81ba-8f57-cb71c7b0b7b6"
oint notion ПолучитьБазуДанных ^
--token *** ^
--base "26982aa7-fc4e-81ba-8f57-cb71c7b0b7b6"
Результат
{
"object": "database",
"id": "26982aa7-fc4e-81ba-8f57-cb71c7b0b7b6",
"cover": null,
"icon": null,
"created_time": "2025-09-09T18:18:00Z",
"created_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
"last_edited_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
"last_edited_time": "2025-09-09T18:18:00Z",
"title": [
{
"type": "text",
"text": {
"content": "Тестовый заголовок",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Тестовый заголовок",
"href": null
}
],
"description": [
{
"type": "text",
"text": {
"content": "Тестовое описание",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Тестовое описание",
"href": null
}
],
"is_inline": false,
"properties": {
"Номер": {
"id": "%3CC%3F%7B",
"name": "Номер",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"Активен": {
"id": "%3CNg%3E",
"name": "Активен",
"description": null,
"type": "checkbox",
"checkbox": {}
},
"Дата создания": {
"id": "DmAm",
"name": "Дата создания",
"description": null,
"type": "date",
"date": {}
},
"Картинка": {
"id": "EdVo",
"name": "Картинка",
"description": null,
"type": "files",
"files": {}
},
"Телефон": {
"id": "GrHn",
"name": "Телефон",
"description": null,
"type": "phone_number",
"phone_number": {}
},
"Пользователь": {
"id": "%5DO%7D%3E",
"name": "Пользователь",
"description": null,
"type": "people",
"people": {}
},
"Почта": {
"id": "%5EA%3Ag",
"name": "Почта",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Описание": {
"id": "%60a%7Bc",
"name": "Описание",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Статус": {
"id": "cPJo",
"name": "Статус",
"description": null,
"type": "select",
"select": {
"options": [
{
"id": "78310dff-8651-41b3-8628-b4b10e0d0449",
"name": "Новый",
"color": "green",
"description": null
},
{
"id": "ba04be3d-459e-4894-86a3-cb3c91d6a0ae",
"name": "В работе",
"color": "yellow",
"description": null
},
{
"id": "2c9940c0-6fc9-4ae9-8eb7-7cf0520821d3",
"name": "Удаленный",
"color": "red",
"description": null
}
]
}
},
"Имя": {
"id": "title",
"name": "Имя",
"description": null,
"type": "title",
"title": {}
}
},
"parent": {
...