2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 4
2025-05-05 11:15:20 +03:00
description: Edit page properties 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
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Notion]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Edit page properties
Changes the properties of an existing page
`Function EditPageProperties(Val Token, Val Page, Val Data = "", Val Icon = "", Val Cover = "", Val Archived = False) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Page | --page | String | ✔ | ID of the page being modified |
| Data | --data | Map Of KeyAndValue | ✖ | Map of editable parameters |
| Icon | --icon | String | ✖ | URL of the page icon image |
| Cover | --cover | String | ✖ | URL of the page cover image |
| Archived | --archive | Boolean | ✖ | Archive page or not (boolean) |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Notion
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-10-15 10:16:04 +03:00
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
2025-05-21 08:49:49 +03:00
Page = "1f982aa7-fc4e-81c4-8d7d-c1908a106b51";
2024-10-15 10:16:04 +03:00
Icon = "https://api.athenaeum.digital/test_data/picture.jpg";
Cover = "https://api.athenaeum.digital/test_data/picture2.jpg";
Archive = False;
Properties = New Map;
2025-03-06 20:58:59 +03:00
Properties.Insert("Active", False);
Properties.Insert("Email" , "vector@mail.ru");
2024-10-15 10:16:04 +03:00
2025-03-06 20:58:59 +03:00
Result = OPI_Notion.EditPageProperties(Token, Page, Properties, Icon, Cover, Archive);
2024-10-15 10:16:04 +03:00
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
2024-10-22 08:59:24 +03:00
# JSON data can also be passed as a path to a .json file
2024-10-20 22:36:03 +03:00
oint notion EditPageProperties \
2024-10-22 08:59:24 +03:00
--token "***" \
2025-05-21 10:35:46 +03:00
--page "1fa82aa7-fc4e-8138-94a2-c967d55ae314" \
2024-10-22 08:59:24 +03:00
--data "{'Active':false,'Email':'vector@mail.ru'}" \
--icon "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg" \
--cover "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture2.jpg" \
--archive false
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
2024-10-22 08:59:24 +03:00
:: JSON data can also be passed as a path to a .json file
2024-10-20 22:36:03 +03:00
oint notion EditPageProperties ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2025-05-21 10:35:46 +03:00
--page "1fa82aa7-fc4e-8138-94a2-c967d55ae314" ^
2024-10-22 08:59:24 +03:00
--data "{'Active':false,'Email':'vector@mail.ru'}" ^
--icon "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg" ^
--cover "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture2.jpg" ^
--archive false
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```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": {
"type": "external",
"external": {
"url": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture2.jpg"
}
},
"icon": {
"type": "external",
"external": {
"url": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"
}
},
"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": "e069f5c5-7f34-4674-b438-48d3c6042971"
}
```