Forum Discussion

pkrish80's avatar
pkrish80
Contributor
11 years ago

how to get data returned by rest api call based on timestamp

Hi All,

 

I am using a REST Api in my Java Code as a part of the HP Community. I am able to retrieve all the messages from the posts. I would like to know how can I use this api to get messages between a certain timestamp or dates. I am getting the "recent" ones as shown in the api below. Please let me know when you have a chance.

 

http://<<hpcommunity>>/restapi/vc/boards/id/Ink/posts/recent?page_size=100&page=1&restapi.response_format=json&restapi.format_detail=full_list_element&restapi.response_style=view

 

Thanks

  • Hi All,

     

    This is what I am using to get the range of messages in the last month sorted by post_time.

     

    http://<<communityname>>/restapi/vc/boards/id/"+categoryType+"/posts/recent?rangeTime=1M&sort_by=-post_time&page_size="+numOfCalls+"&page="+pageNum+"&restapi.response_format=json&restapi.format_detail=full_list_element&restapi.response_style=view

     

    This doesn't seem to work. Can someone chime in on this?

     

    Thanks,

    Prasanna