2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 2
2025-05-05 11:15:20 +03:00
description: Get database and other functions to work with Notion in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Notion]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get database
Get database information
`Function GetDatabase(Val Token, Val Base) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Base | --base | String | ✔ | Database ID |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Notion
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-06-29 14:35:33 +03:00
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
2025-10-08 00:46:26 +03:00
Base = "28582aa7-fc4e-815a-adef-d400e97818a7";
2024-10-15 10:16:04 +03:00
Result = OPI_Notion.GetDatabase(Token, Base);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint notion GetDatabase \
2024-10-22 08:59:24 +03:00
--token "***" \
2025-10-10 09:59:43 +03:00
--base "28682aa7-fc4e-8162-8ae3-d05c35ee1bee"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint notion GetDatabase ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2025-10-10 09:59:43 +03:00
--base "28682aa7-fc4e-8162-8ae3-d05c35ee1bee"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"object": "database",
2025-10-10 09:59:43 +03:00
"id": "28782aa7-fc4e-815b-ab93-e96a5c025ece",
2024-10-15 10:16:04 +03:00
"cover": null,
"icon": null,
2025-10-10 09:59:43 +03:00
"created_time": "2025-10-09T21:05:00Z",
2024-10-15 10:16:04 +03:00
"created_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
"last_edited_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
2025-10-10 09:59:43 +03:00
"last_edited_time": "2025-10-09T21:05:00Z",
2024-10-15 10:16:04 +03:00
"title": [
{
"type": "text",
"text": {
"content": "TestTitle",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "TestTitle",
"href": null
}
],
"description": [
{
"type": "text",
"text": {
"content": "TestDescription",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "TestDescription",
"href": null
}
],
"is_inline": false,
"properties": {
2025-10-10 09:59:43 +03:00
"Phone": {
"id": "BCte",
"name": "Phone",
2025-09-12 20:23:31 +03:00
"description": null,
2025-10-10 09:59:43 +03:00
"type": "phone_number",
"phone_number": {}
2024-10-15 10:16:04 +03:00
},
2025-10-07 19:27:04 +03:00
"Active": {
2025-10-10 09:59:43 +03:00
"id": "C~f%3B",
2025-10-07 19:27:04 +03:00
"name": "Active",
2025-09-15 13:14:53 +03:00
"description": null,
2025-10-07 19:27:04 +03:00
"type": "checkbox",
"checkbox": {}
},
2024-10-15 10:16:04 +03:00
"Status": {
2025-10-10 09:59:43 +03:00
"id": "%5DZQs",
2024-10-15 10:16:04 +03:00
"name": "Status",
2025-09-12 20:23:31 +03:00
"description": null,
2024-10-15 10:16:04 +03:00
"type": "select",
"select": {
"options": [
{
2025-10-10 09:59:43 +03:00
"id": "47ce6f86-e7a6-4b3a-9a94-8f9dee3d79e1",
2024-10-15 10:16:04 +03:00
"name": "New",
"color": "green",
"description": null
},
{
2025-10-10 09:59:43 +03:00
"id": "90f4cba2-e265-4890-8ad9-b68182718ce2",
2024-10-15 10:16:04 +03:00
"name": "InProgress",
"color": "yellow",
"description": null
},
{
2025-10-10 09:59:43 +03:00
"id": "2b5c39b4-5337-4d9f-9ceb-d050ee7ab830",
2024-10-15 10:16:04 +03:00
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
2025-10-10 09:59:43 +03:00
"User": {
"id": "_%7Dw%5E",
"name": "User",
2025-09-16 09:07:33 +03:00
"description": null,
2025-10-10 09:59:43 +03:00
"type": "people",
"people": {}
2025-09-16 09:07:33 +03:00
},
2025-10-07 19:27:04 +03:00
"Email": {
2025-10-10 09:59:43 +03:00
"id": "iGxd",
2025-10-07 19:27:04 +03:00
"name": "Email",
2025-09-16 09:07:33 +03:00
"description": null,
2025-10-07 19:27:04 +03:00
"type": "rich_text",
"rich_text": {}
2025-09-16 09:07:33 +03:00
},
"Image": {
2025-10-10 09:59:43 +03:00
"id": "iJnF",
2025-09-16 09:07:33 +03:00
"name": "Image",
"description": null,
"type": "files",
"files": {}
},
2025-10-10 09:59:43 +03:00
"CreationDate": {
"id": "mAG_",
"name": "CreationDate",
2025-09-16 09:07:33 +03:00
"description": null,
2025-10-10 09:59:43 +03:00
"type": "date",
"date": {}
},
"Number": {
"id": "z%3EnU",
"name": "Number",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"Description": {
"id": "%7Dm%7BA",
"name": "Description",
"description": null,
"type": "rich_text",
"rich_text": {}
2025-09-16 09:07:33 +03:00
},
2024-10-15 10:16:04 +03:00
"Name": {
"id": "title",
"name": "Name",
2025-09-12 20:23:31 +03:00
"description": null,
2024-10-15 10:16:04 +03:00
"type": "title",
"title": {}
}
},
"parent": {
2025-09-12 20:23:31 +03:00
...
2024-10-15 10:16:04 +03:00
```