Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I'm trying to use this REST call in order to update a datalake type connection in a report
- https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasourcesingroup
However I get the following error message when doing so, be it through the documention website itself or PowerShell
{
"error": {
"code": "BadRequest",
"message": "Bad Request",
"details": [
{
"message": "Error converting value \"connectionDetails\" to type 'Microsoft.PowerBI.ServiceContracts.Api.UpdateDatasourceDetails'. Path 'updateDetails[1]', line 14, position 25.",
"target": "updateDatasourcesRequest.updateDetails[1]"
},
{
"message": "'updateDatasourcesRequest' is a required parameter",
"target": "updateDatasourcesRequest"
}
]
}
}
And here is the JSON I'm giving to the call
{
"updateDetails": [
{
"datasourceSelector": {
"datasourceType": "Extension",
"connectionDetails": {
"path": "https://<OLD-DataLake>.azuredatalakestore.net/<PATH-TO-FILE>/",
"kind": "DataLake"
}
},
"datasourceId": "<Current-GUID>",
"gatewayId": "<Current-GUID>"
},
"connectionDetails": {
"path": "https://<NEW-DataLake>.azuredatalakestore.net/<PATH-TO-FILE>/",
"kind": "DataLake"
}
}
]
}
This is a format found working in this post: https://stackoverflow.com/questions/58518997/how-to-update-a-data-source-via-the-api
If anyone can give me a pointer to what's the issue it would great
Thanks
Solved! Go to Solution.
Hi @m-cerna ,
Based on your json code, I think you missed a "{" or wrote an extra "}". You could check the code again.
Hi @m-cerna ,
Based on your json code, I think you missed a "{" or wrote an extra "}". You could check the code again.
Hi @m-cerna ,
Has your problem been solved? Was my reply helpful to you? If the problem is resolved, you could accept the reply you like.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
29 | |
28 | |
22 | |
22 | |
19 |
User | Count |
---|---|
53 | |
36 | |
28 | |
24 | |
21 |