You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-29 22:27:42 +02:00
210 lines
4.1 KiB
Plaintext
Vendored
210 lines
4.1 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 2
|
|
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
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Notion]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Get database
|
|
Get database information
|
|
|
|
|
|
|
|
`Function GetDatabase(Val Token, Val Base) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Token | --token | String | ✔ | Token |
|
|
| Base | --base | String | ✔ | Database ID |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Notion
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
|
Base = "29c82aa7-fc4e-8184-8582-da9da081508e";
|
|
|
|
Result = OPI_Notion.GetDatabase(Token, Base);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint notion GetDatabase \
|
|
--token "***" \
|
|
--base "29c82aa7-fc4e-81dd-91f2-f1e5911332dd"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint notion GetDatabase ^
|
|
--token "***" ^
|
|
--base "29c82aa7-fc4e-81dd-91f2-f1e5911332dd"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"object": "database",
|
|
"id": "29d82aa7-fc4e-8173-83c3-eef87a456cc4",
|
|
"cover": null,
|
|
"icon": null,
|
|
"created_time": "2025-10-31T11:46: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-10-31T11:46:00Z",
|
|
"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": {
|
|
"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": {}
|
|
},
|
|
"Active": {
|
|
"id": "Z%5B%3Dr",
|
|
"name": "Active",
|
|
"description": null,
|
|
"type": "checkbox",
|
|
"checkbox": {}
|
|
},
|
|
"User": {
|
|
"id": "%5EIRs",
|
|
"name": "User",
|
|
"description": null,
|
|
"type": "people",
|
|
"people": {}
|
|
},
|
|
"CreationDate": {
|
|
"id": "%60%7BzS",
|
|
"name": "CreationDate",
|
|
"description": null,
|
|
"type": "date",
|
|
"date": {}
|
|
},
|
|
"Image": {
|
|
"id": "g%5EIp",
|
|
"name": "Image",
|
|
"description": null,
|
|
"type": "files",
|
|
"files": {}
|
|
},
|
|
"Email": {
|
|
"id": "nJ%40%3F",
|
|
"name": "Email",
|
|
"description": null,
|
|
"type": "rich_text",
|
|
"rich_text": {}
|
|
},
|
|
"Description": {
|
|
"id": "oeUs",
|
|
"name": "Description",
|
|
"description": null,
|
|
"type": "rich_text",
|
|
"rich_text": {}
|
|
},
|
|
"Status": {
|
|
"id": "~d%3Cz",
|
|
"name": "Status",
|
|
"description": null,
|
|
"type": "select",
|
|
"select": {
|
|
"options": [
|
|
{
|
|
"id": "baddcdaa-38ec-4a30-bb0a-3ad825ed31c3",
|
|
"name": "New",
|
|
"color": "green",
|
|
"description": null
|
|
},
|
|
{
|
|
"id": "09d5c3f9-052d-4bc6-a68e-3468343a019e",
|
|
"name": "InProgress",
|
|
"color": "yellow",
|
|
"description": null
|
|
},
|
|
{
|
|
"id": "df89a664-1720-411e-b20c-f2479b064e33",
|
|
"name": "Remote",
|
|
"color": "red",
|
|
"description": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Name": {
|
|
"id": "title",
|
|
"name": "Name",
|
|
"description": null,
|
|
"type": "title",
|
|
"title": {}
|
|
}
|
|
},
|
|
"parent": {
|
|
...
|
|
```
|