Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi All,
I am trying to connect a REST API to Power BI using POST method -
i have the following details -
webURL - https://mis.domain.com/fms-mobile/profile/searchPerson/
API header - Content-Type: application/x-www-form-urlencoded
API Key - xxxxxxx
Request body - inputParam: {"searchValue":"0","searchId":"0","employeeCode":"0","apiKey":"xxxxxxxx","offset":"0","personId":"0"}
The API should return one of 2 options - and on success, it must display the results.
{
"failure": {
"failure_status": 0,
"failure_message": ""
},
"success": {
"success_status": 1,
"success_message": ""
},
"result_data":[ ....
I have written the following code in the advanced editor -
let
Query1 = Json.Document(Web.Contents("https://mis.domain.com/fms-mobile/profile/searchPerson/", [Headers = [#"Content-Type"="application/x-www-form-urlencoded"],
Content = Text.ToBinary("""inputparam"":{""searchValue"":""0"",""searchId"":""0"",""employeeCode"":""0"",""apiKey"":""xxxxxxx"",""offset"":""0"",""personId"":""0"" })]
))
in Query1
This code is fetching the API information, however giving the result as database connection failed.
I am unable to understand what the issue is. Request if anyone could help!!
Regards,
Manand
Solved! Go to Solution.
That seems to be a problem on "their" side. Check with the API owner.
That seems to be a problem on "their" side. Check with the API owner.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |