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
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 |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
tip
Method at API documentation: log.blogpost.get
1C:Enterprise/OneScript code example
PostID = "1062";
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
Result = OPI_Bitrix24.GetPosts(URL, PostID);
URL = "b24-ar17wx.bitrix24.by";
Token = "35c31667006e9f06006b12e400000001000...";
Result = OPI_Bitrix24.GetPosts(URL, PostID, , Token);
- Bash
- CMD/Bat
oint bitrix24 GetPosts \
--url "b24-ar17wx.bitrix24.by" \
--postid 1148 \
--token "***"
oint bitrix24 GetPosts ^
--url "b24-ar17wx.bitrix24.by" ^
--postid 1148 ^
--token "***"
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",
...