What is the point of publishing a datasource to a specific project on Tableau while using REST API?
https://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm#REST/rest_api_ref.htm#Publish_Datasource%3FTocPath%3DAPI%2520Reference%7C_____53 is the REST API call that is used to publish a datasource. I'm trying to commit a file previously uploaded. The request body is supposed to follow the following format:
<datasource name="datasource-name" >
<connectionCredentials name="connection-username" password="connection-password"
embed="embed-flag" oAuth="oauth-flag" />
<project id="project-id" />
I don't understand why I need to specify a project ID in the request body. What is the significance of doing so? Even if I specify a project ID in the body, I still am able to use the datasource from other projects within the same site and hence my confusion.
The call requests the various items because of the way the API is coded and requires all the fields. Thought projects can be restricted to certain users and I believe it needs the project ID so that it inherents the proper persmissions for where it is being published to.
Hope this helps!