Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello there, i'm having a problem with trying to access data from API service, using Blank Query in Power BI.
= let url = "https://**********/events?api-version=2016-12-12", body = "{""searchSpan"": {""from"": {""dateTime"":""2018-08-20T00:00:00.000Z""},""to"": {""dateTime"":""2018-08-27T00:00:00.000Z""}},""top"" : {""sort"" : [{""input"" : {""builtInProperty"" : ""$ts""},""order"" : ""Asc""}],""count"" : 2000}}""}", Source = Json.Document(Web.Contents(url,[ Headers = [#"Authorization"="Bearer token", #"Content-Type"="application/json"], Content = Text.ToBinary(body)])) in Source
When i put this request to the query, this is the error i recieveve:
DataSource.Error: Web.Contents failed to get contents from '*******/events?api-version=2016-12-12' (400): Bad Request
Details:
DataSourceKind=Web
DataSourcePath=*******/events
Url=*******/events?api-version=2016-12-12
Steps I already did:
1. Through Postman everything works perfectly.
2. Credentials to this URL in Data Source Settings is set to Anonymous
I can't reproduce your problem.
Could you try "Get Date"->"Web", enter your url, then select "Anonymous" for credentail.
Additionally,Please reffer to below link it has similar problem and it suggest to change the code a bit.
Best regards
maggie
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.
User | Count |
---|---|
81 | |
42 | |
30 | |
27 | |
27 |