---
schema_version: "1"
id: 56c11069a799f4eece9ec14af982a77d7e5cb729e8af1173b20e633b230ffadb
title: Using the API
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/explore-tableau/docs/using-the-api.md
canonical_url: https://help.tableau.com/v0.0/api/explore-tableau/en-us/docs/using-the-api.html
source_site: help.tableau.com
content_type: documentation
content_hash: 1dd5fd7dc612a2262b97fd307fc49954412de00841d0b1726c5b94d756a9a664
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](/v0.0/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>&nbsp;(United&nbsp;States&nbsp;of&nbsp;America)<br><code class="language-plaintext highlighter-rouge">us-west-2</code>&nbsp;(United&nbsp;States&nbsp;of&nbsp;America)<br><code class="language-plaintext highlighter-rouge">ap-south-2</code>&nbsp;(India)<br><code class="language-plaintext highlighter-rouge">ap-southeast-3</code>&nbsp;(Indonesia)<br><code class="language-plaintext highlighter-rouge">ap-northeast-2</code>&nbsp;(South&nbsp;Korea)<br><code class="language-plaintext highlighter-rouge">ap-southeast-1</code>&nbsp;(Singapore)<br><code class="language-plaintext highlighter-rouge">ap-southeast-2</code>&nbsp;(Australia)<br><code class="language-plaintext highlighter-rouge">ap-northeast-1</code>&nbsp;(Japan)<br><code class="language-plaintext highlighter-rouge">ca-central-1</code>&nbsp;(Canada)<br><code class="language-plaintext highlighter-rouge">eu-central-1</code>&nbsp;(Germany)<br><code class="language-plaintext highlighter-rouge">eu-west-2</code>&nbsp;(United&nbsp;Kingdom)<br><code class="language-plaintext highlighter-rouge">eu-central-2</code>&nbsp;(Switzerland)</td><td>If your organization has data residency requirements, choose a region from the list that complies with those requirements. Otherwise, you should generally choose the region that’s closest to your data.</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](/v0.0/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>