﻿---
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

<br/>



```bsl title="1C:Enterprise/OneScript code example"
    Token = "secret_9RsfMrRMqZwqp0Zl0B...";
    Base  = "29382aa7-fc4e-81e2-a08a-c0ce0c962918";

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

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint notion GetDatabase \
             --token "***" \
             --base "28d82aa7-fc4e-813c-9f5e-ecbe6ad80be3"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint notion GetDatabase ^
             --token "***" ^
             --base "28d82aa7-fc4e-813c-9f5e-ecbe6ad80be3"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "object": "database",
 "id": "29982aa7-fc4e-8165-9383-ceb47e2029c5",
 "cover": null,
 "icon": null,
 "created_time": "2025-10-27T09:59: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-27T09:59: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": {
  "Active": {
   "id": "%3Fi%3Dw",
   "name": "Active",
   "description": null,
   "type": "checkbox",
   "checkbox": {}
  },
  "CreationDate": {
   "id": "GJs%3B",
   "name": "CreationDate",
   "description": null,
   "type": "date",
   "date": {}
  },
  "Image": {
   "id": "Xh~%3C",
   "name": "Image",
   "description": null,
   "type": "files",
   "files": {}
  },
  "Email": {
   "id": "%5E~%3C%60",
   "name": "Email",
   "description": null,
   "type": "rich_text",
   "rich_text": {}
  },
  "Phone": {
   "id": "hn%3Dz",
   "name": "Phone",
   "description": null,
   "type": "phone_number",
   "phone_number": {}
  },
  "Description": {
   "id": "l%3Fcd",
   "name": "Description",
   "description": null,
   "type": "rich_text",
   "rich_text": {}
  },
  "User": {
   "id": "rCPm",
   "name": "User",
   "description": null,
   "type": "people",
   "people": {}
  },
  "Number": {
   "id": "vXTq",
   "name": "Number",
   "description": null,
   "type": "number",
   "number": {
    "format": "number"
   }
  },
  "Status": {
   "id": "%7Dkh%3E",
   "name": "Status",
   "description": null,
   "type": "select",
   "select": {
    "options": [
     {
      "id": "4b0124e2-e40c-4a22-9557-d1ecd931f0ff",
      "name": "New",
      "color": "green",
      "description": null
     },
     {
      "id": "cd76fd5c-9bb9-4761-adac-fffe3917df5a",
      "name": "InProgress",
      "color": "yellow",
      "description": null
     },
     {
      "id": "08d93219-0e74-40eb-bc14-8356526fb359",
      "name": "Remote",
      "color": "red",
      "description": null
     }
    ]
   }
  },
  "Name": {
   "id": "title",
   "name": "Name",
   "description": null,
   "type": "title",
   "title": {}
  }
 },
 "parent": {
...
```
