log.blogpost.add
Adds a record to the Activity Stream on behalf of the current user.
Function parameters
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) |
DEST | Access permissions to view messages (optional), default value - array("UA") - to all authorised users.
The following values can be used:
|
SPERM | Access permissions to view the message (optional); by default - array("UA") - for all authorized users. |
FILES | Files, array of values, described by rules, provide in here. |
IMPORTANT | Set to "Y" by default. Activity Stream message is posted as "important". |
IMPORTANT_DATE_END | Date/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-2024