How do I get a complete list in the API call response?

Marcelo Romero

I'm currently having an issue with the endpoint to get the list of all our courses (currently more than 3,000). I'm using the "GET /api/author/course_templates" endpoint and adding the "limit" parameter to get up to 4000 (GET /api/author/course_templates?limit=4000).  My problem is that no matter what the limit is, it always gives me 1,000 max. Is there a way to get the complete list?

0

Comments

2 comments

  • Comment author
    Douglas Costa
    • Edited

    @MarcelRomero I'm currently having an issue with the endpoint to get the list of all our courses (currently more than 3,000). I'm using the "GET /api/author/course_templates" endpoint and adding the "limit" parameter compassmobile dollartree com to get up to 4000 (GET /api/author/course_templates?limit=4000).  My problem is that no matter what the limit is, it always gives me 1,000 max. Is there a way to get the complete list?

    It sounds like the API might have a hard limit of 1,000 items per request. You may need to implement pagination to retrieve the full list. Check if the API provides pagination parameters like page or offset to help you fetch all the courses.

     

    0
  • Comment author
    Marcelo Romero

    Hi Douglas! Thank you for your comment. They DO provide a pagination system in the response which is a link to the next page. All good now 👍

    0

Please sign in to leave a comment.