Forum Discussion
While Creating Semantic Layer in directQuery Mode Need to attach with database
- 1 year ago
Hi. Like the UI after you publish a new semantic model, the first thing would be edit it's credentials at the settings of configure a gateway. Using the API for changing data source or creating a new semantic model is the same here. Until a month or two it was mandatory to do it at the UI. Nowadays there is a Fabric Rest API request that might let you write the credentials. I haven't tested yet how it works but I know it's preview. You can try it if you want to keep all in code: https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/update-connection?tabs=HTTP
I hope that helps,
Thanks ibarrau for your suggestions
i am trying to explore update connection api there we need to pass connection id
but in our case i have created semantic layer so i have dataset id that's where not getting idea what connection id we need to pass to update database credentials in created semantic layer
let me know if you could find something !! that will help me a lot
Thanks in Advance !!!
- ibarrau1 year agoSuper User
You can check all the connections your users can see with: https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/list-connections?tabs=HTTP
Find the id of the one you want to change credentials and update connection.
I hope that make sense