API Get Limit 500?

Comments

5 comments

  • Marc Decroos

    limit is indeed max 500 so first run is 0==> 500 en then next run 501==> 1000 etc ...you get each run a return value of how many items you get in your JSON, once it is less than 500 you reached the end, so you need a "while" or "for" construction to fetch them all in different gets ...

    0
    Comment actions Permalink
  • Waleed Ali

    Hi Marc Decroos,

    Thanks for responding, I am using while loop for it already but for first run 0==> 500 it fetches JSON of 500 but when it tries to fetch 501==> 1000 it start giving error "Limit must not be larger than 500", What I am doing is I am getting on the basis of Limit and Offset, for first run of loop they set as Limit = 500 and Offset=0, for second run these are being set as Limit = 1000 and Offset=501 where I got this error.

     

    0
    Comment actions Permalink
  • Waleed Ali

    I've verified from API Sandbox on Podio's API Reference page online and getting same error. PFA Screenshot.

    0
    Comment actions Permalink
  • Marc Decroos

    like the error indicates, limit is always smaller than 500, so keep it at 500 or 100 per fetch ... offset indicates you are requesting 501-1000 or 501-600, then 601-700 , etc ....just increment "offset" , not "limit" , keep that value at the number of records to fetch (max 500 at a time)

    0
    Comment actions Permalink
  • Waleed Ali

    Hi Marc Decroos, This works for me, Thanks for your response and Thanks for helping me.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk