Documentation

log.blogpost.add

Adds a record to the Activity Stream on behalf of the current user.

Function parameters


This parameter is supported. However, it is more convenient to use DEST.
Parameter Description
USER_ID ID of the record author (optional, by default - current user is specified, other value is accessible only to the administrator of Bitrix24 On-Premise edition).
POST_MESSAGE Message text
POST_TITLE Message title (optional)
DESTAccess permissions to view messages (optional), default value - array("UA") - to all authorised users.
The following values can be used:
  • SG<X> - workgroup, for example: G1 - workgroup with ID 1;
  • U<X> - user with ID=X;
  • DR<X> - department with ID=X, including sub-departments;
  • UA - all authorized users.
  • G<X> - user group, for example: G2 - user group with ID 2.
SPERM Access permissions to view the message (optional); by default - array("UA") - for all authorized users.
FILESFiles, array of values, described by rules, provide in here.
IMPORTANTSet to "Y" by default. Activity Stream message is posted as "important".
IMPORTANT_DATE_ENDDate/time value is specified before which the message is deemed as important.

Example

BX.rest.callMethod('log.blogpost.add', 
{POST_TITLE: 'header', 
POST_MESSAGE: 'text', DEST: ['SG1', 'U2'] }).
then()
BX24.callMethod('log.blogpost.add', {POST_MESSAGE: 'Hello, world!'}, function(r){
	if(!r.error())
		{
		alert('OK!');
		}
	else
		{
		throw r.error();
		}
});

Request:

https://my.bitrix24.com/rest/log.blogpost.add.json?POST_MESSAGE=Hello%2C%20world!&auth=d9a76e2929b7bc1ff21aee9c0ce7e3e2

Response:

{"result":true}


© «Bitrix24», 2001-2022
Up