Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
I'm making API calls to a call tracking service called ResponseTap. Their API allows you to return a list of many call IDs (e.g. clarity-us4-1459508541.810585), but with no further details such as call duration, source, etc. In a different type of call, I'm able to return full call details, but only for a single call ID. I would like to pull full call details (like the second API call) but for multiple call IDs (like the first API call).
API Call 1 (multiple call IDs, no details)
let Source = Xml.Tables(Web.Contents("https://dashboard.responsetap.com/api/1/accounts/5482/cdrids?fromDate=2016-04-01&toDate=2016-04-05")), Table0 = Source{0}[Table], Table1 = Table0{0}[Table], #"Changed Type" = Table.TransformColumnTypes(Table1,{{"Element:Text", type text}}) in #"Changed Type"
API Call 2 (single call ID, full details)
let Source = Xml.Tables(Web.Contents("https://dashboard.responsetap.com/api/1/accounts/5482/fullCallRecords/clarity-us4-1459508541.810585")), #"Changed Type" = Table.TransformColumnTypes(Source,{{"cdrId", type text}, {"customerNumber", Int64.Type}, {"trackingNumber", Int64.Type}, {"businessNumber", Int64.Type}, {"campaignName", type text}, {"callDate", type datetime}, {"callDuration", Int64.Type}, {"callTalkTime", Int64.Type}, {"disposition", type text}, {"recorded", type logical}, {"sourceId", Int64.Type}, {"channelName", type text}, {"mediumName", type text}, {"mediumTypeName", type text}, {"numberGroupId", Int64.Type}, {"numberGroupName", type text}, {"callId", Int64.Type}}) in #"Changed Type"
How could I replace the call ID in the second API call (clarity-us4-1459508541.810585) with a variable that would pull in call IDs from the first API call and report full call details for all of them? Thanks!
Here is a similar scenario that should help you out.
http://datachix.com/2014/05/22/power-query-functions-some-scenarios/
Basically, the concept is to turn your API Call 2 into a function that takes one or more parameters and then you call API Call 2 function for each row in API Call 1.
In your case, you may have to create multiple functions and custom columns that call those functions, or return everything in a comma-separated return value and then do a split on that column as a subsequent step in your API Call 1 query.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
65 | |
42 | |
42 |
User | Count |
---|---|
46 | |
38 | |
28 | |
26 | |
26 |