Forum Discussion
Convert this code which is a Function into a self looping piece of code for batch
Hi Phil
In hindsight it may be better to post the actual requirment instead of trying to fix my dodgy code
As per your request I will attached the .pbix - I will also attach the actual returned data in .json format for each of the API calls
This is the sequence of API calls (Domain name abd Api-Token modified)
1. API Call: https://domain.com/api/v2/entities?entitySelector=type%28APPLICATION%29&from=now-8d&fields=%2BfirstSeenTms&Api-Token=yyyy
On the first call there are a number of "Data Points" returned:
- totalCount - Number of records in response
- pageSize - Limit imposed per API call
- nextPageKey - Value to be passed to get the next payload
- entities - Actual data to be used
2. API Call: https://domain.com/api/v2/entities?nextPageKey=yyyy%22&Api-Token=xxx
On the second call we pass the "nextPageKey" parameter only and its value - the "totalCount", "pageSize" and "entities" "Data Points" are returned (Because this is the last response with data the "nextPageKey" value is actually ommitted so we can't check if nextPageKey=NULL or something similar
If the returning response had many rows there would be a unique nextPageKey for the next response
Much Appreciated
Thanks
Alan
I am not able to attach any files ..how do I attach files?
- PhilipTreacy4 years agoSuper User
hi AlanFoley
You can use OneDrive, Dropbox or Google Drive to upload your files then link to them.
Regards
Phil
- Syndicate_Admin4 years agoAdministrator
hi @AlanFoley
You can use OneDrive, Dropbox or Google Drive to upload your files then link to them.
Regards
Phil