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
1C:Enterprise/OneScript code example
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
Base = "28c82aa7-fc4e-812a-85a6-d7e18ec38bd2";
Result = OPI_Notion.GetDatabase(Token, Base);
- Bash
- CMD/Bat
oint notion GetDatabase \
--token "***" \
--base "28d82aa7-fc4e-813c-9f5e-ecbe6ad80be3"
oint notion GetDatabase ^
--token "***" ^
--base "28d82aa7-fc4e-813c-9f5e-ecbe6ad80be3"
Result
{
"object": "database",
"id": "28d82aa7-fc4e-813c-9f5e-ecbe6ad80be3",
"cover": null,
"icon": null,
"created_time": "2025-10-15T09:39: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-15T09:39: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": "%3A%40sm",
"name": "Active",
"description": null,
"type": "checkbox",
"checkbox": {}
},
"Phone": {
"id": "DKWY",
"name": "Phone",
"description": null,
"type": "phone_number",
"phone_number": {}
},
"Description": {
"id": "EdER",
"name": "Description",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Number": {
"id": "GBhx",
"name": "Number",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"CreationDate": {
"id": "JEML",
"name": "CreationDate",
"description": null,
"type": "date",
"date": {}
},
"Email": {
"id": "K%3Cjm",
"name": "Email",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"User": {
"id": "%5Dopv",
"name": "User",
"description": null,
"type": "people",
"people": {}
},
"Image": {
"id": "iBvB",
"name": "Image",
"description": null,
"type": "files",
"files": {}
},
"Status": {
"id": "qljD",
"name": "Status",
"description": null,
"type": "select",
"select": {
"options": [
{
"id": "0b75fd86-bd5d-4b3f-bf57-1090103376d1",
"name": "New",
"color": "green",
"description": null
},
{
"id": "a3cc9086-34c4-4b73-8eab-ddae9498b164",
"name": "InProgress",
"color": "yellow",
"description": null
},
{
"id": "dc85b516-6ea8-4435-8c48-e623fc013da8",
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
"Name": {
"id": "title",
"name": "Name",
"description": null,
"type": "title",
"title": {}
}
},
"parent": {
...