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 = "14682aa7-fc4e-8194-9797-d8cd67ca183a";
Result = OPI_Notion.GetDatabase(Token, Base);
- Bash
- CMD/Bat
oint notion GetDatabase \
--token "***" \
--base "14682aa7-fc4e-8101-86b1-d95806168981"
oint notion GetDatabase ^
--token "***" ^
--base "14682aa7-fc4e-8101-86b1-d95806168981"
Result
{
"object": "database",
"id": "11a82aa7-fc4e-8138-a724-ee8786147d82",
"cover": null,
"icon": null,
"created_time": "2024-10-09T06:14: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": "2024-10-09T06:14: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": {
"Description": {
"id": "%3COFd",
"name": "Description",
"type": "rich_text",
"rich_text": {}
},
"Phone": {
"id": "Ne%7DI",
"name": "Phone",
"type": "phone_number",
"phone_number": {}
},
"CreationDate": {
"id": "P%3Doo",
"name": "CreationDate",
"type": "date",
"date": {}
},
"Active": {
"id": "Ub%7C%5D",
"name": "Active",
"type": "checkbox",
"checkbox": {}
},
"Number": {
"id": "%5Dotl",
"name": "Number",
"type": "number",
"number": {
"format": "number"
}
},
"Email": {
"id": "%60%7DN%3F",
"name": "Email",
"type": "rich_text",
"rich_text": {}
},
"Status": {
"id": "bAZ%7D",
"name": "Status",
"type": "select",
"select": {
"options": [
{
"id": "0e626378-0386-4985-88de-b747968504e7",
"name": "New",
"color": "green",
"description": null
},
{
"id": "e9a7ad5c-196f-4b2a-b2de-e84e849f2183",
"name": "InProgress",
"color": "yellow",
"description": null
},
{
"id": "1b214a08-6768-4381-b3cb-d8dd88250f8c",
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
"User": {
"id": "%7B%3Bsu",
"name": "User",
"type": "people",
"people": {}
},
"Image": {
"id": "%7B%3F%5B%3F",
"name": "Image",
"type": "files",
"files": {}
},
"Name": {
"id": "title",
"name": "Name",
"type": "title",
"title": {}
}
},
"parent": {
"type": "page_id",
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77"
},
"url": "https://www.notion.so/11a82aa7fc4e8138a724ee8786147d82",
"public_url": null,
"archived": false,
"in_trash": false,
"request_id": "6bee1b66-c2c7-47c4-96a3-54c83460045a"
}