connect datasource to workspace via API Hi, I’m tr...
# gooddata-ui
r
connect datasource to workspace via API Hi, I’m trying to script the provisioning of workspaces and datasources. I’m stuck on the associatio of the DS to the WS via an API call. Something you do via the UI attached. Any pointer to the way to do this? Tx!
i
Hi Romain, Sorry to hear about your troubles. Could you share more details with us, please? What data source are you trying to connect and what particular API are you calling, please?
r
sure. • I’m creating a WS with
/api/v1/entities/workspaces
• I’m creating a DS with
/api/v1/entities/dataSources
Now I want to associate the new DS with the WS via some API calls, but I don’t know which ones to call for this.
i
If I understand you correctly, you’d like to generate the logical data model(in workspace) from the physical data model(from your data source). If this is the case, please check the API call below: https://www.gooddata.com/docs/cloud/model-data/create-logical-data-model/ You can also test the connection via API.
r
I see. and how do you associate it to the WS?
i
Once a new data source is created and registered as an entity in GD Cloud, you can reuse it in multiple workspaces. Are you working with multiple data sources?
r
not at the moment
I guess a DS has to always be associated via a LDM, not alone, right?
i
Yes, you are correct. There is no specific API endpoint for this, as it is part of logicalModel API endpoint. (Just FYI, I’ve updated my previous API links to the most recent version.)
r
It did, thanks a lot!
🙌 1
i
Happy to hear so! 😉