cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kadefnall Frequent Visitor
Frequent Visitor

API Help (I Think)

Let me start by stating that I am very new to power query and M and PowerBI. Now that this is out of the way, I need assistance with populating a child table using an API call.

 

The parent table is populated using a call like this:

http://oursite.webservices.mydata.com/webapi/api/v1/records?ApiKey=xxxxxxxxxxxxxxxxxx

 

It creates a table with the following

RecordID

Customer Name

Type

Date

1

Customer 1

User

1/1/2017

2

Customer 2

User

2/1/2017

 

To call the details for each record we use a call like the following:

http://oursite.webservices.mydata.com/webapi/api/v1/record/[RecordID]?ApiKey=xxxxxxxxxxxxxxxxxx

 

Which creates a single entity like

RecordID

Location

Active

Open

1

North

True

1/1/2017

 

All API requests return a JSON document.

 

Being new to all of this I can’t figure out how to either repeat the call for each child record or if there is a function that will pass the RecordID to the 2nd API call for each of the RecordID’s in the first table.

 

Any help would be appreciated and if you can point me to any good reference material I would be indebted to you. Thank you in advance for any and all comments and assistance.

1 REPLY 1
Moderator Eric_Zhang
Moderator

Re: API Help (I Think)

@kadefnall

I think you can reference this thread Write M code to run multiple queries and the append them all into a single table.

Please note my comments in that thread.