Forum Discussion
Anonymous
3 years agoNot applicable
Api connection data error
Good morning all, Im trying to connect an api to a link which downloads an excel file. And then i want to get all the data from the excel file. This is the error i get. Im very confused. ...
- Anonymous3 years ago
Hi Anonymous,
Here is a solved sample post with similar issue like yours.
let Source = Json.Document(Web.Contents("http://3.93.175.1/api/abfrage/", [Headers=[#"Content-Type"="application/json", Authorization="Token d04b033d7fa9760147aa32743284ace16de2bbd0"], Content=Json.FromValue({[number_of_requests=1, search_term="Transalb"]})])) in SourceChange request and work:
let Source = Json.Document(Web.Contents("http://3.93.175.1/api/abfrage/", [Headers=[Authorization="Token 6bcc8706f68d3635f1514ce22611e83c12b1e4c1", #"Content-Type"="application/json"], Content=Json.FromValue([number_of_requests="1", search_term="Transalb"])])) in SourceFor refernece:
PowerBI DataSource.Error: Web.Contents failed to get contents (400): Bad request
Using a REST API as a data source
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi Anonymous,
Here is a solved sample post with similar issue like yours.
let
Source = Json.Document(Web.Contents("http://3.93.175.1/api/abfrage/", [Headers=[#"Content-Type"="application/json", Authorization="Token d04b033d7fa9760147aa32743284ace16de2bbd0"], Content=Json.FromValue({[number_of_requests=1, search_term="Transalb"]})]))
in
Source
Change request and work:
let
Source = Json.Document(Web.Contents("http://3.93.175.1/api/abfrage/", [Headers=[Authorization="Token 6bcc8706f68d3635f1514ce22611e83c12b1e4c1", #"Content-Type"="application/json"], Content=Json.FromValue([number_of_requests="1", search_term="Transalb"])]))
in
Source
For refernece:
PowerBI DataSource.Error: Web.Contents failed to get contents (400): Bad request
Using a REST API as a data source
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.