I am using REST API call to get history data. For this I am writing SSJS in Cloud page and am trying to store the data in a data extension. The result of REST API call is more than 100 records. But by default it is giving me page 1 , page size = 100. How to set page size to maximum? I am using a for loop, if condition in the body to get specific activity details for all Id's
In general,but not always the case, you can use the $page and $pageSize parameters to control this.
/fake/myendPoint?$page=1&$pageSize=500 would return a payload of the first 500 items in the return.
Do be careful though as not every endpoint will do this. Also, sometimes in order for $pageSize to work, you need to indicate the page first (like my sample) or it will not affect the return.
EDIT: for anything being retrieved in bulk, I would look to either have multiple calls that are looped through and concatenated (will likely be a high resource draw and risk of timeout issues) or I would look to do a data extract of the full load, push this to an FTP and then utilize your service to grab this data and properly ingest it.