Forum Discussion

RhallTalend's avatar
6 years ago

I need a way of getting access to the posts on the Abuse-Board using an API

I cannot find a way of getting messages flagged as [Abuse] returned by either of the APIs (v1 or v2). I want to get some data from these messages in bulk (user ids, etc) so that I can do some analysis on it. Unfortunately (and for no given reason) it appears that you cannot query this data using the v2 API and the v1 API only allows you to create, update or delete this data. 

Can somebody point me in the direction of a solution? If not, these needs to be raised as feature request.

  • AdamN's avatar
    AdamN
    Khoros Oracle

    RhallTalend If you're just looking to retrieve the abuse reports that have been submitted, you should be able to treat the abuse report board like any other board when you query it directly. 

    So for example, you could make a call like https://devdocportal.lithium.com/t5/Community-API-v1-Reference/bd-p/restv1docs?section=commv1&leaf-id=Board.posts#Board.posts.recent passing in the id of the abuse report board. For example, if the id is "abuse":

    /restapi/vc/boards/id/abuse/posts/recent

    This should give you the abuse reports that have been submitted.

    Similarly, you could query API v2 via LiQL and constrain the messages collection by the same board id. For example:

    select id from messages where board.id = "abuse"

    Since the abuse board is typically private, you'll need to make these API calls as an admin user.

    Note that abuse report messages won't show up in other API responses. For example if you were to just call /restapi/vc/posts/recent in v1 or /api/2.0/search?q=select+id+from+messages. You'll need to constrain by the board for them to appear, per my previous examples.

    To Suzie's point, we don't really have any metrics or analytics around this, nor an API to get the actual messages that were reported. But perhaps retrieving the reports themselves would help with your analysis?