1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-02 22:05:37 +02:00

222 lines
5.5 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 5
---
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
# Get posts
Gen post or array of post with ID or rights selection
`Function GetPosts(Val URL, Val PostID = "", Val Filter = "UA", Val Token = "") Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
| PostID | --postid | String, Number | ✖ | Id of important post |
| Filter | --sel | String | ✖ | Post selection by rights: UA all, SGn work group, Un user, DRn depart, Gn group |
| Token | --token | String | ✖ | Access token, when app auth method used |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
2024-11-21 13:27:18 +03:00
Method at API documentation: [log.blogpost.get](https://dev.1c-bitrix.ru/rest_help/log/log_blogpost_get.php)
2024-10-15 10:16:04 +03:00
:::
<br/>
2024-12-16 19:38:57 +03:00
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-12-09 15:33:55 +03:00
PostID = "1560";
2024-12-08 12:04:47 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/ps5...";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetPosts(URL, PostID);
URL = "b24-ar17wx.bitrix24.by";
2024-12-09 15:33:55 +03:00
Token = "a8e65667006e9f06006b12e400000001000...";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetPosts(URL, PostID, , Token);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 GetPosts \
2024-10-22 08:59:24 +03:00
--url "b24-ar17wx.bitrix24.by" \
2024-12-10 09:08:34 +03:00
--postid 1576 \
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 GetPosts ^
2024-10-22 08:59:24 +03:00
--url "b24-ar17wx.bitrix24.by" ^
2024-12-10 09:08:34 +03:00
--postid 1576 ^
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"result": [
{
"ID": "950",
"BLOG_ID": "1",
"PUBLISH_STATUS": "P",
"TITLE": "New post title",
"AUTHOR_ID": "1",
"ENABLE_COMMENTS": "Y",
"NUM_COMMENTS": "0",
"CODE": null,
"MICRO": "N",
"DETAIL_TEXT": "New post text",
"DATE_PUBLISH": "2024-10-09T09:19:18+03:00",
"CATEGORY_ID": null,
"HAS_SOCNET_ALL": "N",
"HAS_TAGS": "N",
"HAS_IMAGES": "N",
"HAS_PROPS": "Y",
"HAS_COMMENT_IMAGES": null,
"UF_BLOG_POST_DOC": {
"ID": "1",
"ENTITY_ID": "BLOG_POST",
"FIELD_NAME": "UF_BLOG_POST_DOC",
"USER_TYPE_ID": "file",
"XML_ID": "UF_BLOG_POST_DOC",
"SORT": "100",
"MULTIPLE": "Y",
"MANDATORY": "N",
"SHOW_FILTER": "N",
"SHOW_IN_LIST": "N",
"EDIT_IN_LIST": "Y",
"IS_SEARCHABLE": "Y",
"SETTINGS": {
"SIZE": 20,
"LIST_WIDTH": 0,
"LIST_HEIGHT": 0,
"MAX_SHOW_SIZE": 0,
"MAX_ALLOWED_SIZE": 0,
"EXTENSIONS": [],
"TARGET_BLANK": "Y"
},
"EDIT_FORM_LABEL": null,
"LIST_COLUMN_LABEL": null,
"LIST_FILTER_LABEL": null,
"ERROR_MESSAGE": null,
"HELP_MESSAGE": null,
"USER_TYPE": {
"USER_TYPE_ID": "file",
"CLASS_NAME": "Bitrix\\Main\\UserField\\Types\\FileType",
"EDIT_CALLBACK": [
"Bitrix\\Main\\UserField\\Types\\FileType",
"renderEdit"
],
"VIEW_CALLBACK": [
"Bitrix\\Main\\UserField\\Types\\FileType",
"renderView"
],
"USE_FIELD_COMPONENT": true,
"DESCRIPTION": "Файл",
"BASE_TYPE": "file"
},
"VALUE": false,
"ENTITY_VALUE_ID": 950,
"VALUE_EXISTS": true,
"VALUE_RAW": null,
"CUSTOM_DATA": []
},
"UF_BLOG_POST_URL_PRV": {
"ID": "5",
"ENTITY_ID": "BLOG_POST",
"FIELD_NAME": "UF_BLOG_POST_URL_PRV",
"USER_TYPE_ID": "url_preview",
"XML_ID": "UF_BLOG_POST_URL_PRV",
"SORT": "100",
"MULTIPLE": "N",
"MANDATORY": "N",
"SHOW_FILTER": "N",
"SHOW_IN_LIST": "N",
"EDIT_IN_LIST": "Y",
"IS_SEARCHABLE": "Y",
"SETTINGS": [],
"EDIT_FORM_LABEL": null,
"LIST_COLUMN_LABEL": null,
"LIST_FILTER_LABEL": null,
"ERROR_MESSAGE": null,
"HELP_MESSAGE": null,
"USER_TYPE": {
"USER_TYPE_ID": "url_preview",
"CLASS_NAME": "Bitrix\\Main\\UrlPreview\\UrlPreviewUserType",
"DESCRIPTION": "Содержимое ссылки",
"BASE_TYPE": "int"
},
"VALUE": null,
"ENTITY_VALUE_ID": 950,
"VALUE_EXISTS": true,
"VALUE_RAW": null,
"CUSTOM_DATA": []
},
"UF_GRATITUDE": {
"ID": "9",
"ENTITY_ID": "BLOG_POST",
"FIELD_NAME": "UF_GRATITUDE",
"USER_TYPE_ID": "integer",
"XML_ID": "UF_GRATITUDE",
"SORT": "100",
"MULTIPLE": "N",
"MANDATORY": "N",
"SHOW_FILTER": "N",
"SHOW_IN_LIST": "N",
"EDIT_IN_LIST": "Y",
"IS_SEARCHABLE": "N",
"SETTINGS": {
"SIZE": 20,
"MIN_VALUE": 0,
"MAX_VALUE": 0,
"DEFAULT_VALUE": null
},
"EDIT_FORM_LABEL": null,
"LIST_COLUMN_LABEL": null,
"LIST_FILTER_LABEL": null,
"ERROR_MESSAGE": null,
"HELP_MESSAGE": null,
"USER_TYPE": {
"USER_TYPE_ID": "integer",
"CLASS_NAME": "Bitrix\\Main\\UserField\\Types\\IntegerType",
"EDIT_CALLBACK": [
"Bitrix\\Main\\UserField\\Types\\IntegerType",
"renderEdit"
],
"VIEW_CALLBACK": [
"Bitrix\\Main\\UserField\\Types\\IntegerType",
"renderView"
],
"USE_FIELD_COMPONENT": true,
"DESCRIPTION": "Целое число",
"BASE_TYPE": "int"
},
"VALUE": null,
"ENTITY_VALUE_ID": 950,
"VALUE_EXISTS": true,
"VALUE_RAW": null,
"CUSTOM_DATA": []
},
"UF_BLOG_POST_FILE": {
"ID": "19",
"ENTITY_ID": "BLOG_POST",
"FIELD_NAME": "UF_BLOG_POST_FILE",
"USER_TYPE_ID": "disk_file",
"XML_ID": "UF_BLOG_POST_FILE",
...
```