Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I have a problem getting data from REST API. Here's some background:
I'm trying to get data from REST API with Web.Contents. This API requires md5 hashed code and each call has to be unique (hashed code can be used only once). URL and md5 hashed code are generated in Power BI before calling the API and everything is fine so far. But each Web.Contents call returns error message REQUEST_NOT_UNIQUE: Unique hashed code is already used.
Next lines are from Power BI log. It seems that Web.Contents is executed twice.
Line 2384: DataMashup.Trace Information: 24579 : {"Start":"2017-12-19T11:43:53.4206534Z","Action":"Engine/IO/Web/Request/GetResponse","HostProcessId":"18160","RequestMethod":"GET","RequestUri":"XXXXX?StartDate=2010-01-01&EndDate=2017-12-01","RequestHasContent":"False","RequestHasHeaders":"True","RequestHasTimeout":"True","UseCache":"True","ResponseStatusCode":"200","ProductVersion":"2.53.4954.481...
Line 2385: DataMashup.Trace Information: 24579 : {"Start":"2017-12-19T11:43:53.6923237Z","Action":"Engine/IO/Web/Request/GetResponse","HostProcessId":"18160","RequestMethod":"GET","RequestUri":"XXXXX?StartDate=2010-01-01&EndDate=2017-12-01","RequestHasContent":"False","RequestHasHeaders":"True","RequestHasTimeout":"True","UseCache":"True","ResponseStatusCode":"200","ProductVersion":"2.53.4954.481...
Any ideas how to fix this or is there any possible workarounds to get the data from API?
Solved! Go to Solution.
This one is solved. API was limited to max 500 rows per call and and error message for slightly misleading.
Can you post your M code?
Here is the M code.
Timestamp, md5 hash and end date come from SQL Server and each list contains only one value. Other values come from static parameters.
If I change parameter values then I get different error message about incorrect http headers / values. So it seems that the URL generated right, but for some reason I always get error message about not unique request.
let sender = "PBI", customerID = vCustomerId, partnerID = vPartnerId, kieli = vKieli, orga = vYTunnus, trID = "-tositteet", Source = Xml.Tables(Web.Contents("https://yyyy.com/nnn.nv", [Headers=[ #"X-Authentication-Sender"=sender, #"X-Authentication-CustomerId"=customerID, #"X-Authentication-PartnerId"=partnerID, #"X-Authentication-Timestamp"=List.First(timestamp), #"X-Interface-Language"=kieli, #"X-Organisation-ID"=orga, #"X-Authentication-TransactionId"=List.First(timestamp) & trID, #"X-Authentication-MAC"=List.First(md5_hash)], Query=[StartDate="2010-01-01", EndDate=List.First(endDate)] ])), #"Expanded Table" = Table.ExpandTableColumn(Source, "Table", {"Status", "TimeStamp"}, {"Table.Status", "Table.TimeStamp"}), #"Expanded Table.Status" = Table.ExpandTableColumn(#"Expanded Table", "Table.Status", {"Element:Text"}, {"Table.Status.Element:Text"}) in #"Expanded Table.Status"
This one is solved. API was limited to max 500 rows per call and and error message for slightly misleading.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.