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-10-21 11:36:43 +03:00
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
2025-10-31 15:42:42 +03:00
Base = "29c82aa7-fc4e-8184-8582-da9da081508e";
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-31 15:42:42 +03:00
--base "29c82aa7-fc4e-81dd-91f2-f1e5911332dd"
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-31 15:42:42 +03:00
--base "29c82aa7-fc4e-81dd-91f2-f1e5911332dd"
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-31 15:42:42 +03:00
"id": "29d82aa7-fc4e-8173-83c3-eef87a456cc4",
2024-10-15 10:16:04 +03:00
"cover": null,
"icon": null,
2025-10-31 15:42:42 +03:00
"created_time": "2025-10-31T11:46: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-31 15:42:42 +03:00
"last_edited_time": "2025-10-31T11:46: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-31 15:42:42 +03:00
"Number": {
"id": "BlJD",
"name": "Number",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"Phone": {
"id": "Wl~i",
"name": "Phone",
"description": null,
"type": "phone_number",
"phone_number": {}
},
2025-10-15 14:32:00 +03:00
"Active": {
2025-10-31 15:42:42 +03:00
"id": "Z%5B%3Dr",
2025-10-15 14:32:00 +03:00
"name": "Active",
"description": null,
"type": "checkbox",
"checkbox": {}
},
2025-10-31 15:42:42 +03:00
"User": {
"id": "%5EIRs",
"name": "User",
"description": null,
"type": "people",
"people": {}
},
2025-10-15 14:32:00 +03:00
"CreationDate": {
2025-10-31 15:42:42 +03:00
"id": "%60%7BzS",
2025-10-15 14:32:00 +03:00
"name": "CreationDate",
"description": null,
"type": "date",
"date": {}
},
2025-10-27 16:23:35 +03:00
"Image": {
2025-10-31 15:42:42 +03:00
"id": "g%5EIp",
2025-10-27 16:23:35 +03:00
"name": "Image",
"description": null,
"type": "files",
"files": {}
},
2025-10-15 14:32:00 +03:00
"Email": {
2025-10-31 15:42:42 +03:00
"id": "nJ%40%3F",
2025-10-15 14:32:00 +03:00
"name": "Email",
"description": null,
"type": "rich_text",
"rich_text": {}
},
2025-10-27 16:23:35 +03:00
"Description": {
2025-10-31 15:42:42 +03:00
"id": "oeUs",
2025-10-27 16:23:35 +03:00
"name": "Description",
"description": null,
"type": "rich_text",
"rich_text": {}
},
2024-10-15 10:16:04 +03:00
"Status": {
2025-10-31 15:42:42 +03:00
"id": "~d%3Cz",
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-31 15:42:42 +03:00
"id": "baddcdaa-38ec-4a30-bb0a-3ad825ed31c3",
2024-10-15 10:16:04 +03:00
"name": "New",
"color": "green",
"description": null
},
{
2025-10-31 15:42:42 +03:00
"id": "09d5c3f9-052d-4bc6-a68e-3468343a019e",
2024-10-15 10:16:04 +03:00
"name": "InProgress",
"color": "yellow",
"description": null
},
{
2025-10-31 15:42:42 +03:00
"id": "df89a664-1720-411e-b20c-f2479b064e33",
2024-10-15 10:16:04 +03:00
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
"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
```