Collate all pages from GET response to one variable

Hi Community,

I am running a GET request. The response has 501,000 results and there a limit of 100 results on a page. Is there a way for me to collate all the results into one variable using a Test script?

Hello @deedo11,

As far I know, whenever there’s a pagination implemented and your results has a limit, only the current response can be stored in a variable. To parse through this you can set your index and reach till the end of result. But each time, you can save the current response only (100 records limit), and even the Tests are applicable only to them.

Hi @bpricilla I see, that’s a bit disappointing.
Thank you.

@deedo11 I understand how it will be :slightly_smiling_face: But May I know the purpose of storing the entire response into a single variable? Based on your results, I could vaguely imagine a the size of the response :roll_eyes:

Just a suggestion, check your API documentation and try adding the filters to extract the desired response .

Hi @bpricilla I am playing around with the Etsy API.
I want to get listings that have>1000 views for each Taxonomy ID I specify. I also want the listings sorted in descending order by the number of views.

The only parameter I can use based on the activeListing method is Taxonomy ID (e.g. 66 for Art). I use a test script to filter by views and sort in descending order.

The issue I have which you mentioned is the test script only applies to the page not the entire response.