Forum Discussion

vishwajeet_hol's avatar
10 years ago
Solved

To Hide the board from lists and menus – set and get API

Hi All,

 

I have created a blog using below rest API call:

http://<community>/restapi/vc/categories/id/<category_id>/nodes/type/key/blog/add

 

Parameters used:  blog.id and blog.title

 

As, we know there is a checkbox for "Hide from lists and menus" while creating and editing any node.

I want to perform the same action (i.e. "Hide from lists and menus" ) while creating/editing a node using rest API call.

 

Please let me know if there is any way.

Thank you.

 

Regards,

Vishwajeet

 

 

  • Hi,

     

    you can switch that by changing the "config.hidden" setting:

     

    http://<community>/restapi/vc/boards/id/<board_id>/settings/name/config.hidden/set?value=true

     

    Cheers,

    Chiara

6 Replies

  • ChiaraS's avatar
    ChiaraS
    Lithium Alumni (Retired)
    10 years ago

    Hi,

     

    you can switch that by changing the "config.hidden" setting:

     

    http://<community>/restapi/vc/boards/id/<board_id>/settings/name/config.hidden/set?value=true

     

    Cheers,

    Chiara

  • Hi ChiaraS,

     

    Need some additional information from you.

    By using the rest API call given by you, I can set the value of config.hidden field only for already created boards.

    Now suppose, I am creating a new board through rest API call and I want to set the value of config.hidden field at the same time.

    Is this possible ?

     

    Let me know if there is any way.

     

    Thanks,

    Vishwajeet

  • ChiaraS's avatar
    ChiaraS
    Lithium Alumni (Retired)
    10 years ago

    Don't think it's possible in 1 call, you will have the use 2 calls for this...

  • That meance I can not set this property at the the time of board creation through rest API call.

    Correct ? 

  • ChiaraS's avatar
    ChiaraS
    Lithium Alumni (Retired)
    10 years ago

    Hi,

     

    not sure what you mean. You can set that via REST at creation time, but you would need to invoke 2 calls, 1 to create the board and 1 to set the flag to true:

     

    http://<community>/restapi/vc/categories/id/<category_id>/nodes/type/key/blog/add?blog.id=<blog_id>&blog.title=<title>

    http://<community>/restapi/vc/boards/id/<blog_id>/settings/name/config.hidden/set?value=true

     

    If for some reason you're only able to perform 1 call, then no it's not possible.