Forum Discussion

nfoulet's avatar
nfoulet
Adept
14 years ago

get the start date or end date of a contest

Hello I would like to know how to get the start / end date of a contest, using the rest api. Thank you very much for your help

 

 

5 Replies

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)
    14 years ago

    You should be able to get that with these two calls.

     

    /restapi/vc/polls/id/[poll id]/start_time
    /restapi/vc/polls/id/[poll id]/end_time
  • thesedays's avatar
    thesedays
    Guide
    11 years ago

    KaelaC 

    Is it possible that this answer is for a poll, not for a normal contest?

    When I check a contest in our environment (/restapi/vc/boards/id/[contest id]/polls), I get this message:

    "<response status="success"><polls/></response>"

     

    So, no poll in this contest. I didn't find anything that seems usefull for this.

    Only for a poll, you can check "has_ended".

    Can anyone please have a look at this?

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)
    11 years ago
    That is very possible. Let me double check...
  • Hi nfoulet 

     

    I had the same requirement and therefore opened a product idea: https://community.lithium.com/t5/Product-ideas/Provide-REST-API-calls-to-see-if-a-contest-is-active/idi-p/171367

     

    For the time being I'm using the following two calls to get the start and end date of a contest:

    • /boards/id/<board_id>/settings/name/contest.posting_date_start
    • /boards/id/<board_id>/settings/name/contest.posting_date_end

    Note: These calls can only be used with restadmin

     

    Moreno

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    11 years ago

    Hi

     

    the call mfeltscher has included is relying on the fact that these values (set in Admin) are then stored as board level settings. It should be completely okay to use this for the time being as it's just another way of accessing a board setting.

     

    Thanks,