Forum Discussion

kandulmadhu's avatar
10 years ago

API for creating new contest

Hi,

 

Is there any REST API for creating new contest?

If yes, please provide the REST API here.

I need to select the media type as well while creating the contest via the REST API post call.

 

Any help would be appreciated.

Thanks in advance.

 

Regards,

Madhu

  • kandulmadhu's avatar
    kandulmadhu
    10 years ago

    Hey,

    I got the REST API for this.

     

    You could use the following post call for creating a contest:

    "http://<community>/restapi/vc/nodes/type/key/contest/add" and the following are the mandatory parameters for this call

    contest.id

    contest.title

     

    Though I still need to get the parameters for setting the media type for this contest.

     

    Thanks,

    Madhu

  • kandulmadhu - Check this threadContests are a "style" of board: "forum", "blog", "idea", "contest", "qanda", "review", etc. are all board "Conversation Styles" (we used to call this "Interaction Styles" or "Discussion Styles").

     

    As you can create the contest inside that using API in this link.

     

    • kandulmadhu's avatar
      kandulmadhu
      Advisor

      Hi VarunGrazitti,

      Thanks for replying.

       

      As we know Contest is a type of board and we can create board via "/boards/add" API but I need to set its interaction style as "contest".

      When we create contest via community structure in the admin tab, a board is created with interaction style as contest.

      Can we achieve this via REST API call, because I tried via "/boards/add" but I need some parameter that I could pass to set the interaction_style of the board.

       

      Regards,

      Madhu

       

      • VarunGrazitti's avatar
        VarunGrazitti
        Boss
        You could may be try passing this as a parameter:

        message.discussionStyle=contest

        or

        board.discussionStyle = contest


        Just a hit and try case.