Forum Discussion

micha80's avatar
micha80
Expert
9 years ago

Get readonly status using RestAPI or LiQL

Hi @all,

 

we made a board only readonly and want to get this information using the RestAPI or LiQL.

 

Setup "Readonly"

1. We have done the setting in: Community Admin => Community structure => Manage board

2. There is an option like "Set all messages to readonly" (in German it is called "Alle Beiträge auf schreibgeschützt setzen.")

 

Regardless of which option I choose (RestAPI or LiQL) I do not get the information about this setting. Does anyone know how to get this?

 

Many thanks!

 

Regards,

Michael

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    micha80 the message resource has a read_only property:

     

    SELECT read_only FROM messages

    However, it looks like you can't use the read_only property in a WHERE clause, so this won't work:

     

    SELECT * FROM messages WHERE read_only='true'
    • micha80's avatar
      micha80
      Expert

      Hi OlivierS,

       

      thanks for your reply. But the question is not about messages. Its about boards.

       

      Regards,

      Michael

      • Claudius's avatar
        Claudius
        Boss

        Hallo Michael,
        I would have expected the read only parameter to be exposed via the "settings" call for Boards. Unfortunately no luck there.

        But I recalled an earlier case where I wanted to enable custom tags on individual board level and via some DOM inspection of the admin settings I found the correct parameter name to poll:

         

        http://community.lithium.com/community-name/restapi/vc/boards/id/[id]/settings/name/config.read_only