Forum Discussion

ptmuldoon's avatar
ptmuldoon
Icon for Resolver I rankResolver I
4 years ago

Loop and Combine Web.Contents Query

I am trying to pull data that where I need to set the a 'SiteTag' number.  And I have a list of 50 'SiteTag' numbers.

 

Is there a way that I can loop and combine them all into 1 table?  It will be identical columsn with each query.

 

 

token = AccessToken,
  range = "&BD=1/1/2021&ED=12/31/2021&SiteTag=",
  p3286 = Json.Document(Web.Contents(api_base_url & token & range & "3286", [Headers = [#"Authorization"="Bearer "&token,#"Content-Type"="application/json"]])),
  
  p4401 = Json.Document(Web.Contents(api_base_url & token & range & "4401", [Headers = [#"Authorization"="Bearer "&token,#"Content-Type"="application/json"]])),

 

 

 

I have 50+ 'p####' SiteTags to combine. 

2 Replies