Forum Discussion
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
Hi pkrish80
What about this call:
http://community/restapi/vc/search/messages?q=board_id:ID%20AND%20latestPostDate:[1234567%20TO%2012344567]&sort_by=-topicPostDate
Please not that you would need to calculate the latestPostDate parameter which specify in interval in millisecond. Freemarker has functions for performing transformations to get milliseconds of a date (http://community.lithium.com/t5/Developers-Knowledge-Base/datesupport-FreeMarker-context-object/ta-p/9349).
Thanks,
Nico
- pkrish8011 years agoContributor
Hi Nico,
The api parameters do not seem to work. Any other suggestions?
Thanks,
Prasanna
- NicoB11 years agoLithium Alumni (Retired)
Hi pkrish80
I've tried with this call and it seems to work:
Bear in mind that I was wrong about the timestamp.
The date parameter actually needs to be specified in seconds since epoch.
You can calculate this using for example this website http://www.epochconverter.com/
Thanks,
Nico
Related Content
- 3 years ago