Forum Discussion

qinglau's avatar
qinglau
Mentor
11 years ago

Pre moderation on Blog article

Hi All,

 

We would like build a pre moderation on Blog articles function. By looking around TKB, forum and REST API document, we find out that we can get a specific message the specifc moderate status. (http://lithosphere.lithium.com/t5/developers-discussion/REST-API-messages-moderation-required-POSTmoderation-amp/m-p/59148#M1964) 

 

Our questions are :

 

1. We would like to use REST API to set the specific message with the specifc moderate status "to be moderated", "In moderation" and "Post Moderation".   is it possible to do that by using RESTAPI call?  

 

We are trying to find out whether our board moderation is enable. It returns a false 

 

http://kpn.stage.lithium.com/restapi/vc/messages/id/1699/board/settings/name/board.enable_moderation

http://community.lithium.com/community-name/restapi/vc/messages/id/<id>/board/settings/name/board.enable_moderation


response status="success">
<value type="string">off</value>
</response>

 

How we can set our one of node board (blog) with a moderation on? 

 

2. In case, we can use REST API call to set message moderation status .  Can we view all the "pre moderation" blog articles in Lithium standard moderation page?

 

Thank you. Looking forward to any tips

 

Cheers,
Qing 

 

 

 

 

  • YuriK's avatar
    YuriK
    Khoros Expert

    Hey qinglau,

     

    1) In order to change moderation type via rest api, you can make a POST request to the url you were calling to get the settting but with a /set at the end. In your case:

    http://kpn.stage.lithium.com/restapi/vc/messages/id/1699/board/settings/name/board.enable_moderation/set

       You will also need to send the value that you want to set it to using the "value" post parameter. Take a look here for a description of the call. The valid values for board.enable_moderation are "off", "post", and "pre". Alternatively, you can set the moderation for a board in the "Mod Tools" tab in Admin.

     

    2) You should be able to get all unmoderated messages via the /posts/recent call and passing in moderation.scope=unmoderated query parameter. You can find more information about this call here

     

    Hope this helps,

     

    Yuri