I am struggling to create code that iterates through a query until the desired result is achieved. Let's say I make this request:
{{API host}}/{{APP ID}}/{{REST API}}/hive/Management/set/keys?filterPattern=*&pageSize=5&cursor=0
The response from the server is:
{
"keys": [],
"cursor": "252"
}
Then, I take the value of cursor="252"
and include it in the next query
{{API host}}/{{APP ID}}/{{REST API}}/hive/Management/set/keys?filterPattern=*&pageSize=5&cursor=252
This process should continue until the server responds with cursor="0"
I have been stuck on this problem for four days and I'm running out of ideas. Maybe implementing a while
loop could help me solve it? Any assistance would be greatly appreciated.