1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-29 21:57:16 +02:00
Vitaly the Alpaca (bot) cba967e2a0 Main build (Jenkins)
2024-12-12 22:37:54 +03:00

104 lines
2.1 KiB
Plaintext

---
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Delete block
Deletes block by ID
`Function DeleteBlock(Val Token, Val BlockID) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| BlockID | --block | String | ✔ | Block ID |
Returns: Map Of KeyAndValue - serialized JSON response from Notion
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
Block = "15982aa7-fc4e-81d2-b0e2-debc8c088ff5";
Result = OPI_Notion.DeleteBlock(Token, Block);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint notion DeleteBlock \
--token "***" \
--block "15782aa7-fc4e-81f1-b0c1-c919369f51c0"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint notion DeleteBlock ^
--token "***" ^
--block "15782aa7-fc4e-81f1-b0c1-c919369f51c0"
```
</TabItem>
</Tabs>
```json title="Result"
{
"object": "block",
"id": "11a82aa7-fc4e-817b-994e-c3d1a6fadf1b",
"parent": {
"type": "page_id",
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77"
},
"created_time": "2024-10-09T06:14:00Z",
"last_edited_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"
},
"has_children": false,
"archived": true,
"in_trash": true,
"type": "to_do",
"to_do": {
"rich_text": [
{
"type": "text",
"text": {
"content": "YoYO",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "YoYO",
"href": null
}
],
"checked": false,
"color": "default"
},
"request_id": "62e67e42-3ae5-4e59-9472-2c72c2be1b62"
}
```