2024-06-05 10:19:46 +00:00
|
|
|
---
|
|
|
|
sidebar_position: 3
|
|
|
|
---
|
|
|
|
|
|
|
|
# Edit database properties
|
|
|
|
Edits properties of an existing database
|
|
|
|
|
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
`Function EditDatabaseProperties(Val Token, Val Base, Val Properties = "", Val Title = "", Val Description = "") Export`
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| Base | --base | String | Target database ID |
|
|
|
|
| Properties | --props | Map of KeyAndValue | New or modified database properties |
|
|
|
|
| Title | --title | String | New database title |
|
|
|
|
| Description | --description | String | New database description |
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from Notion
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-07-10 14:05:58 +03:00
|
|
|
<br/>
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 10:19:46 +00:00
|
|
|
```bsl title="Code example"
|
2024-10-01 21:08:09 +03:00
|
|
|
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
|
|
|
Base = "11282aa7-fc4e-810b-ab77-cef5a2a3443e";
|
|
|
|
|
|
|
|
Title = "TestTitle";
|
|
|
|
Description = "TestDescription";
|
|
|
|
|
|
|
|
Properties = New Map;
|
|
|
|
Properties.Insert("Email", "rich_text"); // Type fields "Email" will changed with email to text
|
|
|
|
Properties.Insert("Website"); // Field "Website" will deleted
|
|
|
|
|
|
|
|
Result = OPI_Notion.EditDatabaseProperties(Token, Base, Properties, Title, Description);
|
2024-06-05 10:19:46 +00:00
|
|
|
```
|
2024-08-13 15:52:26 +03:00
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-06-05 10:19:46 +00:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
oint notion EditDatabaseProperties --token "secret_9RsfMrRMqZwqp0Zl0B..." --base "5dd94c34fab04bff9..." --props %props% --title "Updated title" --description "Updated base description"
|
2024-06-05 10:19:46 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-10-02 09:14:30 +03:00
|
|
|
|
2024-06-05 10:19:46 +00:00
|
|
|
```
|