I need to call multiple rest calls for getting the information from the SharePoint Online. Iam using java script.
First I need to get all subsites and then I need to get all lists information from each subsite. I managed to get the information using REST calls. I need to know if there is a best practice for calling multiple REST calls.
I need to ensure that after successful completion of one API call, the subsites call, I can then make the lists call.
Can anyone suggest best approach with sample code if possible? I need to call multiple get calls one by one after successful completion previous call. Currently i am storing all the subsite urls in an array and doing for each on the array to store list urls in another array.