Forum Discussion

MLachapelle's avatar
11 years ago

RESTAPI - Get messages starting at a specific id

Hi,

 

I want to get all messages starting from a specific id. For example, I have 1000 messages and want all messages past message/id/301. Is there a better way than doing that call incrementing the page number until I find it.

 

/restapi/v1/messages?page_size=100&page=1

 

Thanks

 

 

  • This can be done, you need to write some jquery code, get the last read/scanned message in an object, and then start from there the next time you want to start the scanning.
  • What is your actual requirement, seeing the example above, I can't clearly pen down the available options for you. Do you know what all messages you want to print, please provide more details on the actual requirement rather then the example so I can provide some thoughts on it.
    • MLachapelle's avatar
      MLachapelle
      Helper

      I want to scan a community or a category retrieving all messages in it.

       

      But, if I stop during  the scan, I want to be able to restart where I have stopped.

       

      Does it help you to understand?

       

      Thanks to help me,

      Max

      • VarunLuthra's avatar
        VarunLuthra
        Advisor
        This can be done, you need to write some jquery code, get the last read/scanned message in an object, and then start from there the next time you want to start the scanning.