Connect to Tableau
Automate your Tableau estate with governed, scheduled REST scripts.
Govern Your Automations
Create up to 20 governed automations, test them dry, and approve live runs explicitly. Every run streams into the REST API Console.
Automations
0 / 20REST API Live Console
LIVEEdit automation
Console
IDLERun history
📖 Tableau REST API reference
# Plain Python, the official rest-api-samples format:
# github.com/tableau/rest-api-samples/tree/master/python
from version import VERSION # supplied on the run path
import requests
import xml.etree.ElementTree as ET
import sys, os, math
xmlns = {'t': 'http://tableau.com/api'}
# The samples' own helpers, verbatim:
# _encode_for_display(text)
# _check_status(server_response, success_code)
# -> raises ApiCallError("code: summary - detail")
# sign_in(server, pat_name, pat_secret, site)
# -> PAT XML fields (Cloud refuses user/password)
# sign_out(server, auth_token)
# Every call is requests + a versioned URL:
url = server + "/api/{0}/sites/{1}/users?fields=_all_" \
.format(VERSION, site_id)
r = requests.get(url, headers={'x-tableau-auth': auth_token})
_check_status(r, 200)
xml = ET.fromstring(r.text)
xml.findall('.//t:user', namespaces=xmlns)
# Paginate: pageSize/pageNumber + totalAvailable (math.ceil)
def main():
##### STEP 1: Sign in #####
##### STEP 2..N: your steps, numbered prints #####
##### STEP N: Sign out (only a session YOU minted) #####
if __name__ == '__main__':
main()
Runs are headless — no input()/getpass.
The environment supplies TA_SERVER · TA_SITE · TA_PAT_NAME/TA_PAT_SECRET (scheduled) or
TA_AUTH_TOKEN/TA_SITE_ID (the live shared session — adopt it, NEVER sign it out) ·
TA_DRY_RUN (writes are blocked at the transport while ON — gate them behind
if not DRY:) · TA_PARAM_*. argv[1] is the server, argv[2] the PAT name.
Reports written with relative paths land in the automation's workdir.
🧩 Snippets
🐍 Generated Python — what actually runs
Your tabcmd commands, translated into the rest-api-samples format. Read-only — edit the tabcmd source and this regenerates on save. Writes are dry-run-gated exactly like any other automation.
Prebuilt
Added disabled + dry-run — review, schedule, then enable it deliberately.
Build with AI
Describe the automation in plain
English — Claude Sonnet writes the tableau Python script. It stays dry-run + review-gated;
Claude never runs or writes anything.
🧾 Action audit trail
Every action — create, edit, enable, run, write-acknowledge, credential lock, Claude build — is recorded here (secret-free).