Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
We currently deploy the same dashboard to multiple environments, (ie, dev, test, prod). These dashboards all pull from an odata api so the URL for the target data willl change for each environment. So for the deployment process we use the rest api to upload the pbix files, but also want to change the api target url for the dashboard based on the environment it is being deployed too.
In trying to use the "updatedatasource" rest api call it states this can be used for an odata feed to update it, but gives no example for this. I have been trying to get this to work with the api it gives a 500 error or a 400 bad request based upon different tries to make this work. From other discussion boards, this may not even be possible. And trying to find a decent example out there for this so far has been a futile effort. I have done this successfully using direct query dashboards which require a user/password. So I understand how to use the api successfully but for the updatedatasource have been unsuccessful with changing a url.
So was wondering if anyone has done this and can share some code. And maybe is this even possible and as per below url it makes me think it might not even be possible. Thanks.
Microsoft updatedatsource info
https://msdn.microsoft.com/en-us/library/mt814715.aspx#request
Below is the url and code example I have been using.
API - body
{
"updateDetails":[
{
"datasourceSelector":
{
"datasourceType": "OData",
"connectionDetails":
{
"url":"https://mydomain.com/mydirectory/odata"
}
}
}
]
}
Solved! Go to Solution.
So after reformatting I was able to successfully change the api url. Below is the example for anyone doing this.
{
"updateDetails":[
{
"connectionDetails":
{
"url":"https://dev.mydomain.com/yourdirectory/odata"
},
"datasourceType": "OData"
}
]
}
So after reformatting I was able to successfully change the api url. Below is the example for anyone doing this.
{
"updateDetails":[
{
"connectionDetails":
{
"url":"https://dev.mydomain.com/yourdirectory/odata"
},
"datasourceType": "OData"
}
]
}
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |