Forum Discussion

akashm's avatar
akashm
Mentor
3 years ago

Is there way to create new status for ideas via API?

Hi,

 

I am trying to update the idea statuses of the Idea Boards for my community via API REST Call.

 

There are about 11 idea exchange boards, and 7 custom idea statuses per board, so it is pretty tedious to update the idea statuses per board manually through the UI.

 

Is there a way to perform this operation via API instead?

I found this: https://devdocportal.khoros.com/t5/Community-API-v1-Reference/bd-p/restv1docs?section=commv1&leaf-id=Board.message_statuses#Board.message_statuses.available.add 

But, I can't get this to work with the query params either.

 

Any help is appreciated

 

/Akash

  • Hi akashm,

     

    Can you please try this one?

     

    [COMMUNITY_URL]/restapi/vc/boards/id/[BOARD_ID]/message_statuses/available/add?message.status=key/pending_closure

     

    Thanks!

    • akashm's avatar
      akashm
      Mentor

      Thanks Payal didn't really work.

       

      Request: 

      https://<MY URL>/restapi/vc/boards/id/<My Board ID>/message_statuses/add?message_status=key/pending_closure

       

      Response: 

      <response status="error">
          <error code="501">
              <message>
            Unknown path element at node &apos;board_message_status_context&apos;.
          </message>
          </error>
      </response>
      • AdamN's avatar
        AdamN
        Khoros Oracle

        akashm It looks like you're missing the /available path in the request. 

        At community level, when creating the status, the path is:

        /restapi/vc/message_statuses/add

        At the board level, when associating the already created status with the board, the path is:

        /restapi/vc/boards/id/<board id>/message_statuses/available/add

        So for your last example, it would be something like:

        https://<MY URL>/restapi/vc/boards/id/<My Board ID>/message_statuses/available/add?message_status=key/pending_closure

        Please give this a try instead