Skip to main content

Get database

Get database information

Function GetDatabase(Val Token, Val Base) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Base--baseStringDatabase ID
Returns

Map Of KeyAndValue - serialized JSON response from Notion

1C:Enterprise/OneScript code example
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
Base = "29d82aa7-fc4e-8173-83c3-eef87a456cc4";

Result = OPI_Notion.GetDatabase(Token, Base);
oint notion GetDatabase \
--token "***" \
--base "36c82aa7-fc4e-8161-a191-c8d5c543850a"
Result
{
"object": "database",
"id": "36c82aa7-fc4e-8161-a191-c8d5c543850a",
"cover": null,
"icon": null,
"created_time": "2026-05-26T14:05: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": "2026-05-26T14:05: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": {
"User": {
"id": "%3A%3Dbf",
"name": "User",
"description": null,
"type": "people",
"people": {}
},
"Number": {
"id": "%40eUv",
"name": "Number",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"CreationDate": {
"id": "BNto",
"name": "CreationDate",
"description": null,
"type": "date",
"date": {}
},
"Description": {
"id": "E%3AM%3B",
"name": "Description",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Email": {
"id": "M%5BT%3F",
"name": "Email",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Active": {
"id": "%5DskN",
"name": "Active",
"description": null,
"type": "checkbox",
"checkbox": {}
},
"Phone": {
"id": "%5EQAt",
"name": "Phone",
"description": null,
"type": "phone_number",
"phone_number": {}
},
"Status": {
"id": "jqFn",
"name": "Status",
"description": null,
"type": "select",
"select": {
"options": [
{
"id": "2220113c-f670-4196-83fc-6a9d05be6090",
"name": "New",
"color": "green",
"description": null
},
{
"id": "a1c4e5f6-8a95-4ee0-b1ea-482909285c66",
"name": "InProgress",
"color": "yellow",
"description": null
},
{
"id": "fc28b3ff-6b34-44c2-9ad1-beed1b4dab18",
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
"Image": {
"id": "pd%3Bk",
"name": "Image",
"description": null,
"type": "files",
"files": {}
},
"Name": {
"id": "title",
"name": "Name",
"description": null,
"type": "title",
"title": {}
}
},
"parent": {
...