Currnetly, api only can respond 100 records. i can use start_index to get more records.
But i need to merge the records to a variable.
I want to use schedule custom function to find the workstations are about to expired and create the ticket for each them.
Here is my code, i want to get all the computers into the variable "all_computers". but i don't know how to merge the data.
times = {1,1,1,1,1,1,1,1,1,1};
all_computers = list();
start_index = 1;
for each time in times
{
computers = zoho.sdp.invokeurl
[
url :"/api/v3/workstations"
type :GET
parameters:{"input_data":{'list_info':{'row_count':100,'get_total_count':'true','start_index': start_index,'search_criteria':{{'field':'expiry_date','condition':'is',"values":{{"value":"1701359999999"}}}}}}}
];
start_index = start_index + 100;
all_computers = all_computers.add(computers.get("workstations"));
if ( computers.get("list_info").get("has_more_rows") == "false" )
{
break;
}
}