---
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 | &#x2714; | Token |
  | Base | --base | String | &#x2714; | Database ID |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Notion



```bsl title="1C:Enterprise/OneScript code example"
    Token = "secret_9RsfMrRMqZwqp0Zl0B...";
    Base  = "2c582aa7-fc4e-8189-8d86-cb479d8efdf9";

    Result = OPI_Notion.GetDatabase(Token, Base);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint notion GetDatabase \
             --token "***" \
             --base "2c582aa7-fc4e-8102-bf01-e0852eafa54f"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint notion GetDatabase ^
             --token "***" ^
             --base "2c582aa7-fc4e-8102-bf01-e0852eafa54f"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "object": "database",
 "id": "2c582aa7-fc4e-8102-bf01-e0852eafa54f",
 "cover": null,
 "icon": null,
 "created_time": "2025-12-10T19:37: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-12-10T19:37: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": {
  "Status": {
   "id": "Ki%5D%3D",
   "name": "Status",
   "description": null,
   "type": "select",
   "select": {
    "options": [
     {
      "id": "70f27d60-9008-4f94-921e-e0a8600095ef",
      "name": "New",
      "color": "green",
      "description": null
     },
     {
      "id": "16f0ff4c-f167-432a-b1d6-edcbca96ffe2",
      "name": "InProgress",
      "color": "yellow",
      "description": null
     },
     {
      "id": "0ea86823-ae7e-4b20-ae92-fca7bf78f2df",
      "name": "Remote",
      "color": "red",
      "description": null
     }
    ]
   }
  },
  "User": {
   "id": "WCE%7D",
   "name": "User",
   "description": null,
   "type": "people",
   "people": {}
  },
  "Number": {
   "id": "YE%3Ad",
   "name": "Number",
   "description": null,
   "type": "number",
   "number": {
    "format": "number"
   }
  },
  "Description": {
   "id": "dx%3DX",
   "name": "Description",
   "description": null,
   "type": "rich_text",
   "rich_text": {}
  },
  "CreationDate": {
   "id": "eD~z",
   "name": "CreationDate",
   "description": null,
   "type": "date",
   "date": {}
  },
  "Email": {
   "id": "fc%40n",
   "name": "Email",
   "description": null,
   "type": "rich_text",
   "rich_text": {}
  },
  "Active": {
   "id": "oZ%40b",
   "name": "Active",
   "description": null,
   "type": "checkbox",
   "checkbox": {}
  },
  "Image": {
   "id": "oZNU",
   "name": "Image",
   "description": null,
   "type": "files",
   "files": {}
  },
  "Phone": {
   "id": "urz%3B",
   "name": "Phone",
   "description": null,
   "type": "phone_number",
   "phone_number": {}
  },
  "Name": {
   "id": "title",
   "name": "Name",
   "description": null,
   "type": "title",
   "title": {}
  }
 },
 "parent": {
...
```
