Publish Data Source

POST {{base-path}}/sites/{{site-id}}/datasources?datasourceType=tdsx

https://help.tableau.com/current/api/restapi/en-us/REST/restapirefdatasources.htm#publishdata_source

Request Params

KeyDatatypeRequiredDescription
overwriteboolean(Optional) true to overwrite a data source that has the same name, or false to fail if the specified data source already exists. The default is false. If overwrite-flag is set to true but the data source doesn't already exist, the operation succeeds.
You can include both the overwrite and append parameters in a request, but they cannot both be true.
asJobboolean(Optional) A Boolean value that is used to publish data sources asynchronously. If you set this value to false (the default), the publishing process runs as a synchronous process. If a data source is very large, the process might time out before it finishes. If you set this value to true, the process runs asynchronously, and a job will start to perform the publishing process and return the job ID. You can check the status of the import job by calling Query Job.
appendboolean(Optional) true to append the data being published to an existing data source that has the same name. The default is false. If append-flag is set to true but the data source doesn't already exist, the operation fails.
In order to append data to a published data source on Tableau Server, both the source file and the published file must be an extract with the file extension .hyper or .tde. The schema of the source and the published extract must match.

If an extract was stored using the multiple tables option, you can't append data to it.

You can include both the overwrite and append parameters in a request, but they cannot both be true. | | uploadSessionId | string | | If you are calling this method to commit a file that was uploaded in parts, this value contains the upload session ID that was generated by a call to Initiate File Upload. If this value is not included, the server assumes that the body of the request contains the file to be published. | | datasourceType | string | | hyper, tds, tdsx, or tde the kind of file that you are uploading. This value is required if you are calling Publish Data Source in order to commit a file that was previously uploaded using Append to File Upload. The value is not used if you upload a file in the body of the request. |

Request Body

[{"name"=>"request_payload", "value"=>"<tsRequest>\n\t<datasource name=\"SuperStore\"\n\tuseRemoteQueryAgent=\"False\"\n\tdescription=\"SuperStore Sales Data Source\">\n\t\t<project id=\"{{project-id}}\" />\n  </datasource>\n</tsRequest>", "datatype"=>"string"}, {"name"=>"tableau_datasource", "value"=>nil, "datatype"=>"null"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring