Forum Discussion

Inactive User's avatar
Inactive User
12 years ago

How to tell if a post has comments disabled via Rest API?

Is this possible? I don't see anything immediately through the REST API but is there another way? Thanks

  • AdamN's avatar
    AdamN
    12 years ago

    Hi jlutterloh,

     

    You're correct, each message returned via the REST API has a "read_only" element which corresponds to whether the message has had "Block New Replies/Comments" set for it. When you select "Block New Replies" in the UI, each message in the discussion will have their "read_only" property set to true.

     

    You can also get this value directly for a message:

    /messages/id/4811/read_only

2 Replies

  • Inactive User's avatar
    Inactive User
    12 years ago
    Well, that makes sense... It appears the read_only signifies this or not. Can someone confirm as a double-check?
  • AdamN's avatar
    AdamN
    Khoros Oracle
    12 years ago

    Hi jlutterloh,

     

    You're correct, each message returned via the REST API has a "read_only" element which corresponds to whether the message has had "Block New Replies/Comments" set for it. When you select "Block New Replies" in the UI, each message in the discussion will have their "read_only" property set to true.

     

    You can also get this value directly for a message:

    /messages/id/4811/read_only