---
schema_version: "1"
id: 6c580ecfcad68e79e1097cbfcb9a0d56df5490cbfe71f091e1831fd53b79595f
title: Using the API
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/api/explore-tableau/docs/using-the-api.md
canonical_url: https://help.tableau.com/current/api/explore-tableau/en-us/docs/using-the-api.html
source_site: help.tableau.com
content_type: documentation
content_hash: 0b19846ca60ed9941520a9d62b992ceb3cd85ab1fe959b7e3ed91953eee2c346
description: Documentation for the Explore in Tableau API
---
# Using the API

  

The steps to use the API are:

1. Construct a TDS
2. Create a JWT
3. Make the request
4. Receive the response

## Construct a TDS

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.

## Create a JWT

The _Explore in Tableau_ API uses a JWT for authorization. The JWT has the following requirements:

- The algorithm (`alg`) in the header must be `HS256`.
- The type (`typ`) in the header must be `JWT`.
- The issuer (`iss`) claim is required, but can be any string.
- The subject (`sub`) claim is required, but can be any string.
- The issued at (`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](/current/api/explore-tableau/en-us/docs/examples.html).

## Make the request

### Method

Submit the request using `POST`.

### URL

`https://api.salesforce.com/analytics/integration/explore-in-tableau/v1/upload-tds-content/{data-provider}`

Replace `{data-provider}` with your data provider string.

### Headers

<table><tbody><tr><td>HTTP Header</td><td>Possible Values</td><td>Notes</td></tr><tr><td><code class="language-plaintext highlighter-rouge">authorization</code></td><td><code class="language-plaintext highlighter-rouge">C2C:{jwt}</code></td><td>Replace <code class="language-plaintext highlighter-rouge">{jwt}</code> with the JWT. The request must be used within 5 seconds of JWT creation.</td></tr><tr><td><code class="language-plaintext highlighter-rouge">x-salesforce-region</code></td><td><code class="language-plaintext highlighter-rouge">us-east-1</code><br><code class="language-plaintext highlighter-rouge">us-west-2</code><br><code class="language-plaintext highlighter-rouge">ca-central-1</code><br><code class="language-plaintext highlighter-rouge">eu-central-1</code><br><code class="language-plaintext highlighter-rouge">eu-west-2</code><br><code class="language-plaintext highlighter-rouge">ap-southeast-1</code><br><code class="language-plaintext highlighter-rouge">ap-southeast-2</code><br><code class="language-plaintext highlighter-rouge">ap-northeast-1</code><br><code class="language-plaintext highlighter-rouge">ap-southeast-3</code></td><td>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.<br>US East (N. Virginia) - us-east-1<br>US West (Oregon) - us-west-2<br>Canada (Central) - ca-central-1<br>EU (Frankfurt) - eu-central-1<br>EU (London) - eu-west-2<br>Asia Pacific (Singapore) - ap-southeast-1<br>Asia Pacific (Sydney) - ap-southeast-2<br>Asia Pacific (Tokyo) - ap-northeast-1<br>Asia Pacific (Jakarta) - ap-southeast-3</td></tr><tr><td><code class="language-plaintext highlighter-rouge">content-type</code></td><td><code class="language-plaintext highlighter-rouge">application/json</code></td><td>JSON is the only valid content type.</td></tr></tbody></table>

### Body

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](/current/api/explore-tableau/en-us/docs/examples.html).

## Receive the response

### Success response

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.

### Error responses

<table><tbody><tr><td>Code</td><td>Reason</td><td>Details</td></tr><tr><td><code class="language-plaintext highlighter-rouge">400</code></td><td><code class="language-plaintext highlighter-rouge">Bad Request</code></td><td>Missing mandatory headers or fields, or the payload (TDS) is over 10MB.</td></tr><tr><td><code class="language-plaintext highlighter-rouge">403</code></td><td><code class="language-plaintext highlighter-rouge">Forbidden</code></td><td>Incorrect JWT or outdated timestamp (JWT <code class="language-plaintext highlighter-rouge">iat</code> claim is over 5 seconds old).</td></tr><tr><td><code class="language-plaintext highlighter-rouge">429</code></td><td><code class="language-plaintext highlighter-rouge">Too Many Requests</code></td><td>Rate limit exceeded.</td></tr><tr><td><code class="language-plaintext highlighter-rouge">500</code></td><td><code class="language-plaintext highlighter-rouge">Internal Server Error</code></td><td>An error occurred on the server.</td></tr></tbody></table>