1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-07 23:03:08 +02:00
Files
OpenIntegrations/docs/en/md/Notion/Page-management/Create-page.mdx
Vitaly the Alpaca (bot) b9d345b8d8 Main build (Jenkins)
2025-05-05 11:15:20 +03:00

114 lines
2.6 KiB
Plaintext
Vendored

---
sidebar_position: 1
description: Create page and other functions to work with Notion in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Notion]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Create page
Creates a child page above another parent page
`Function CreatePage(Val Token, Val Parent, Val Title) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Parent | --page | String | ✔ | Parent ID |
| Title | --title | String | ✔ | Page title |
Returns: Map Of KeyAndValue - serialized JSON response from Notion
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
Parent = "5dd94c34fab04bff986b7511c0779f77";
Title = "TestTitle";
Result = OPI_Notion.CreatePage(Token, Parent, Title);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint notion CreatePage \
--token "***" \
--page "5dd94c34fab04bff986b7511c0779f77" \
--title "TestTitle"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint notion CreatePage ^
--token "***" ^
--page "5dd94c34fab04bff986b7511c0779f77" ^
--title "TestTitle"
```
</TabItem>
</Tabs>
```json title="Result"
{
"object": "page",
"id": "11a82aa7-fc4e-8198-ad23-eeb2e6ea678f",
"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"
},
"cover": null,
"icon": null,
"parent": {
"type": "page_id",
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77"
},
"archived": false,
"in_trash": false,
"properties": {
"title": {
"id": "title",
"type": "title",
"title": [
{
"type": "text",
"text": {
"content": "title",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "title",
"href": null
}
]
}
},
"url": "https://www.notion.so/title-11a82aa7fc4e8198ad23eeb2e6ea678f",
"public_url": null,
"request_id": "17934ae2-309f-4eb5-9123-bd100ad5a559"
}
```