How to get all posts !!!

Unsolved Technical Support
  • Hi,

    I am trying to get all posts of a particular topic but unable to get. I have tried /api/search which returns maximum 500 posts only (10 posts per page) and total page count is 50.Issue is that I have 720 posts in my mongo collections. Is there way to sort it out ?.

    Looking forward for the feedback.

    Regards

  • You can use /api/topic/<id>?page=1 and get all the posts page by page. If you want to load all the posts in one call you need to make a call directly to load them with db.getSortedSetRevRange('tid:<tid>:posts', 0, -1);

  • @baris We want to get all posts available in the database, which is 720. However the max count is 500...How can we do it?

  • I've just done it recently.

    1. call /api/topic/pagination/<tid> to get pagination list
    2. for each one call /api/topic/<tid>?<qs>
    3. merge results and it's done.

    It will be nice to have an option like ?page=all ...


Suggested Topics


  • Guests should see all posts

    Unsolved Technical Support
    0 Votes
    11 Posts
    512 Views
  • -1 Votes
    20 Posts
    1059 Views
  • 0 Votes
    1 Posts
    943 Views
  • 0 Votes
    4 Posts
    1067 Views
  • 1 Votes
    4 Posts
    2503 Views