Forum Discussion

ed_tc's avatar
ed_tc
New Contributor III
7 years ago
Solved

How to deal with paging in post response

Hello all, I have to deal with API with paging. In the body of the response I received not only data but also cursor(pointer to the next page of data). I used REST POST snap. The API was designed...
  • ed_tc's avatar
    ed_tc
    7 years ago


    Hello, not sure that I can, but here it is a skeleton.
    The main idea is if we received an error, we should recall the pipeline with the same parameters, if not we should call the pipeline with the same parameter except cursor( in my case). I got value for the cursor parameter and check it before next iteration. If it not null I recall pipeline with the new cursor + all parameters.
    Get next id’s list and recurse snap I used for call the pipeline again