Tableau
List the content of a Tableau site — workbooks, views, data sources and projects — through the Tableau REST API. Pure Python standard library, no third-party dependencies.
Grounded in the official Tableau REST API reference: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api.htm
- Base URL:
https://{server}/api/3.29, where{server}is your Tableau Server or Tableau Cloud host (e.g.10ax.online.tableau.com).3.29is the current REST API version. - Auth:
X-Tableau-Auth: <token>. The token is a Tableau session token, not the credential itself — see Getting credentials below. - Format: Tableau defaults to XML; this connector sets
Accept: application/jsonso responses come back as JSON.
Operations
| operation | HTTP call | Params used |
|---|---|---|
list_workbooks |
GET /sites/{siteId}/workbooks |
server, siteId, query |
list_views |
GET /sites/{siteId}/views |
server, siteId, query |
list_datasources |
GET /sites/{siteId}/datasources |
server, siteId, query |
list_projects |
GET /sites/{siteId}/projects |
server, siteId, query |
Pagination params (pageSize, pageNumber) and filters go in query, e.g.
{"pageSize": 100, "pageNumber": 1}.
Inputs
| input | required | description |
|---|---|---|
apiKey |
yes | Tableau session token from sign in (sent in X-Tableau-Auth). |
operation |
yes | One of the operations above. |
server |
yes | Tableau Server/Cloud host, e.g. 10ax.online.tableau.com (no scheme). |
siteId |
yes | Site LUID returned by sign in (the id, not the site content URL). |
query |
no | Optional query params as a JSON object string, e.g. {"pageSize": 100}. |
Outputs
result— the Tableau response payload as a JSON string (re-serialized compactly when it parses as JSON).status— the HTTP status code as a string. Tableau error bodies on 4xx/5xx are returned inresultwith the correspondingstatusrather than failing the step; only transport-level failures (DNS, timeout, refused) fail the step.
Getting credentials
Tableau REST API calls require a session token, which you obtain by signing in with a Personal Access Token (PAT). This connector consumes the resulting session token; it does not perform the sign-in itself.
- In Tableau, create a Personal Access Token: My Account Settings → Personal Access Tokens → Create new token. Note the token name and secret.
- Sign in to get a session token by POSTing to
https://{server}/api/3.29/auth/signinwith a body like:
json
{"credentials": {"personalAccessTokenName": "my-pat",
"personalAccessTokenSecret": "xxxxxxxx",
"site": {"contentUrl": "mysite"}}}
The response returns a credentials.token (the session token) and
credentials.site.id (the site LUID).
3. Supply that session token as apiKey and the site LUID as siteId. Session
tokens expire (typically after a period of inactivity) — sign in again to get
a fresh one.
Usage examples
List workbooks on a site:
tableau server=10ax.online.tableau.com siteId=9a8b7c apiKey=<session-token> operation=list_workbooks
List projects, first page of 100:
tableau server=10ax.online.tableau.com siteId=9a8b7c apiKey=<session-token> operation=list_projects query={"pageSize":100,"pageNumber":1}
List data sources:
tableau server=10ax.online.tableau.com siteId=9a8b7c apiKey=<session-token> operation=list_datasources
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
erroroperationresultstatus
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey |
string | yes | — | DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change. |
operation |
string | yes | — | One of: list_workbooks, list_views, list_datasources, list_projects |
server |
string | yes | — | Tableau Server/Cloud host, e.g. 10ax.online.tableau.com or tableau.mycompany.com (no scheme). |
siteId |
string | yes | — | Tableau site LUID (the site id returned by sign in, not the site content URL). |
query |
string | no | — | Optional query params as a JSON object string, e.g. {"pageSize": 100, "pageNumber": 1}. |