The steps to use the API are:
A Tableau Data Source (TDS) is an XML-formatted definition of a data source used in Tableau. This document does not cover the construction of a TDS.
The Explore in Tableau API uses a JWT for authorization. The JWT has the following requirements:
alg) in the header must be HS256.typ) in the header must be JWT.iss) claim is required, but can be any string.sub) claim is required, but can be any string.iat) claim is required, and is expressed in unix time (non-leap seconds since the unix epoch). The API request must be submitted within 5 seconds of the iat.For help on creating a JWT for the request, see Examples.
Submit the request using POST.
https://api.salesforce.com/analytics/integration/explore-in-tableau/v1/upload-tds-content/{data-provider}
Replace {data-provider} with your data provider string.
| HTTP Header | Possible Values | Notes |
authorization |
C2C:{jwt} |
Replace {jwt} with the JWT. The request must be used within 5 seconds of JWT creation. |
x-salesforce-region |
us-east-1 us-west-2 ca-central-1 eu-central-1 eu-west-2 ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-southeast-3 |
If your organization has data residency requirements, choose a region from the list below to comply with those requirements. If you aren’t aware of a limitation, choose any region from the list. US East (N. Virginia) - us-east-1 US West (Oregon) - us-west-2 Canada (Central) - ca-central-1 EU (Frankfurt) - eu-central-1 EU (London) - eu-west-2 Asia Pacific (Singapore) - ap-southeast-1 Asia Pacific (Sydney) - ap-southeast-2 Asia Pacific (Tokyo) - ap-northeast-1 Asia Pacific (Jakarta) - ap-southeast-3 |
content-type |
application/json |
JSON is the only valid content type. |
The request body is a JSON object composed of a single name-value pair. The name is tdsContent, and the value is the base64 URLencoded TDS.
For an example, see Examples.
A successful request returns an HTTP 201 Created status. There is no response body.
The location header in the response contains a Tableau Cloud URL. A user navigating to the URL enters a web authoring session that uses the TDS as the data source. The user will be challenged for Tableau Cloud authentication if they aren’t already logged in.
| Code | Reason | Details |
400 |
Bad Request |
Missing mandatory headers or fields, or the payload (TDS) is over 10MB. |
403 |
Forbidden |
Incorrect JWT or outdated timestamp (JWT iat claim is over 5 seconds old). |
429 |
Too Many Requests |
Rate limit exceeded. |
500 |
Internal Server Error |
An error occurred on the server. |