Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
68 | |
53 | |
39 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |