• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Python API call pagination issue

Resolved: Python API call pagination issue

0
By Isaac Tonny on 15/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve Python API call pagination issue

Question:

I am stuck on the following issue: I have the code below for an API call. In and of itself, the API call is fine, no server issues, I have checked it in Postman:
I am new to all of this, so please bear with me. All I want to do is save all of the records into a data frame at the end, not just the first 100 records. Channel Advisor’s documentation is not really helpful, either, and I haven’t been able to find what I need when searching on Google.
I found a post here that I massaged to add on the “while” loop, and I had to modify it to fit my requirements.
Code version 1 (full):
This code only runs once, likely because the while loop is not set up correctly.
So, I added some error handling:
Code version 2:
The result of this is a Status code 400 runtime error. Again, the server is fine when I try the call on Postman.
So, I modified the while loop again:
Code version 3:
This produces the following error:
I am otherwise stuck. What am I doing wrong?

Best Answer:

Since I dont have API access I can only guess that you confused the break condition in the while loop

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

api json python rest
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Why reference in pointer array doesn’t have data?

24/03/2023

Resolved: EntityFramework creates/runs migrations using parameterless DataContext instance

24/03/2023

Resolved: Visual Studio 2022 crashes when using breakpoints

24/03/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.