Forum Discussion

peterlu's avatar
peterlu
Champion
11 years ago
Solved

get a list of threads/topics from community / board, sort by / order by last reply message

I found a similar post here

http://community.lithium.com/t5/Developers-Discussion/RESTAPI-sort-by-last-edit-time/m-p/139108#M5415

 

There have been requirements for this from multiple customers. I know that the built-in board page threads list has this functionality.

 

Is there a way in the API to fetch the list in this particular order?

 

Possible in API v2?

  • Thanks, DougS, the search api with sort_by=-latestPostDate works for community/category level.

7 Replies

  • Hi Doug,

     

    Thanks for the solution.

     

    My client is asking that can we do the same sorting thing for category or community level topics?

     

    Peter

  • DougS's avatar
    DougS
    Khoros Oracle
    11 years ago

    That threads call can only be made at the board level and there is no API call to do that at the category or community level that I'm aware of, unfortunately.

     

    Try adding sort_by=-latestPostDate to a search API call and see if that does the trick or not.

  • peterlu's avatar
    peterlu
    Champion
    11 years ago

    Thanks, DougS, the search api with sort_by=-latestPostDate works for community/category level.

  • schung's avatar
    schung
    Guide
    11 years ago

    Hi Doug,

     

    Can this call be made to call list of threads from given time range? 

     

    I'm trying to make a call like this:

    mycommunity.com/restapi/vc/boards/id/BOARD_ID/threads?xslt=json.xsl&restapi.session_key=SESSION_KEY&date_start=2014-05-01T00:00:00&date_end=2014-05-01T23:59:59

     

    Thanks!

  • DougS's avatar
    DougS
    Khoros Oracle
    11 years ago

    Unfortunately we don't have support for getting messages posted within a timerange in v1 of our API.  We will have support for this in V2 (which is currently being developed).