Skip to content
Indira Mehta

Dec 3, 202618 min read

The Tableau REST API manages the things a Tableau site is made of: sites, users, groups, projects, workbooks, data sources and refresh jobs.

It works over HTTPS, on both Tableau Cloud and Tableau Server, which is why tools such as Activepieces can call it the same way as any other client. It administers content; it doesn't read the data inside it.

If anything below has drifted, treat the REST API reference at https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api.htm as authoritative.

Someone finds the REST API, sees "workbooks" and "views" in the reference, and assumes it returns rows. It returns files and metadata about files, so the job runs, succeeds and delivers the wrong thing.

Workbook file and metadata card beside an empty table of rows

That is the most common production failure, and it starts with a script that was meant to pull numbers out of a dashboard.

Learn what the Tableau REST API manages

Knowing the boundary before you write the first call saves you that rewrite.

What the REST API can do

Everything it does is an operation on content or on the server around it.

You can sign in and out, create and remove users, assign them to groups, set permissions on projects and workbooks, publish and download workbooks and data sources, and trigger or monitor extract refresh jobs.

These are the repeatable, scriptable chores, which is why they automate well.

Any tool that can send a request can run them, because the operations are plain HTTPS calls.

With Activepieces nobody has to write or hire for the script: describe the sign-in, list-jobs and refresh sequence in the built-in chat and it builds and publishes the flow, the same one a builder would have assembled by hand.

Every run leaves a trace that anyone on the team can read, and MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces in production.

What it can't do: querying data and building views

It doesn't run queries against your data, and it doesn't author visualizations. You can download a view as an image, PDF or CSV export, but that's an export of what the view already shows, not a query interface.

If your script needs to filter, aggregate or join underlying data, you're in the wrong API. The failure shows up as a workaround: brittle CSV parsing of view exports that breaks the first time someone edits a filter.

Activepieces workflow builder showing a Skyvern agent task step with API configuration fields and failure handling options.

Most mistakes here come from picking the neighbor, so read the illustration below as a routing guide. It places the Tableau APIs around a single site: the REST API, highlighted, handles management, while the others touch metadata, embedded views and extract files.

  • The Metadata API answers questions about content relationships, such as which workbooks depend on a given data source, through GraphQL.
  • The Embedding API places Tableau views inside your own web pages.
  • The Hyper API creates and reads Hyper extract files directly, outside the server.
  • The VizQL Data Service queries published data sources programmatically, which is the job people mistakenly hand to the REST API.

With the boundaries set, the next question's how you sign in, because every REST call depends on that.

Everything below works on Activepieces' free plan. Start without code or a credit card.

Get Tableau API access with personal token

For most scripted Tableau REST work, sign in with a personal access token. It gives a job its own identity and an expiry you can plan around, which a shared username and password doesn't.

Tableau personal access token lifetime limits

When someone changes the password a nightly job runs under, or leaves, the job stops. That is the usual failure.

Read the last column of the table first: only two of the three methods hold up without a person nearby. It compares the three sign-in methods on the points that decide whether a job survives unattended.

Method Setup effort Identity used Expiry Fit for unattended jobs
Username and password None beyond an existing account A named person Follows the account's password policy Poor: breaks when the password changes
Personal access token Minutes, from account settings The user who created it Lapses on a schedule Good, if you track expiry
Connected app (JWT) Highest: admin setup and signing code The user named in the signed token Short-lived per token Best for larger automation

Each choice moves the failure point somewhere else, so the sections below take them in order.

Check your Tableau account role and permissions

Confirm the account can sign in to the site you'll call and holds a role that can do what the job needs. A token carries the permissions of the user who made it, so a token from a Viewer can't publish or refresh anything.

Create tokens from a dedicated service account rather than a personal one, so that a departure doesn't take the job down with it.

Create a Tableau personal access token

In your account settings, find the personal access tokens section, name the token after the job it serves, and create it. Copy the secret straight away, because it's shown once and can't be recovered later.

Expiry is the part that bites. A token lasts at most 365 days, according to SnapLogic documentation, so no token's a permanent fix and you need a rotation date on a calendar.

Token card next to a year calendar nearly used up

According to SnapLogic documentation, a token can last up to a year, but one left unused for 15 days stops working.

A token also lapses after 15 days without use, so a monthly job on one token will find it dead before its next run. Schedule a keep-alive call or sign in more often than that.

Use connected apps and JWT for Tableau API

Through a connected app, your code signs its own short-lived JWT (a signed token) instead of storing a long-lived secret.

Setup takes more work, since an administrator registers the app and your code must sign each token, but nothing sits around waiting to lapse after 15 idle days.

Choose a connected app once several jobs share one integration. The next step's turning a sign-in into a working REST session.

Authenticate with Tableau API token

You authenticate by POSTing credentials to the sign-in endpoint, which returns a token and a site ID. Every later call sends that token in an X-Tableau-Auth header, and you sign out when you finish. Each step below depends on the one before it.

Step 1: Find your server URL, site name and API version

You need three values before you send anything.

They're the base URL of your Tableau Cloud pod or Tableau Server, the site's content URL (the short name in the address bar after /site/, empty for a Server's Default site), and an API version such as 3.22.

The version goes into every path. Pin it in a variable rather than hard-coding it in twenty scripts, because the day you upgrade the server is the day you want to change it in one place.

Step 2: Sign in and capture the token and site ID

Use a personal access token (PAT) rather than a password, so no human credential sits in your automation:

curl -X POST "https://YOUR-SERVER/api/3.22/auth/signin" \
 -H "Content-Type: application/json" -H "Accept: application/json" \
 -d '{"credentials":{"personalAccessTokenName":"my-token","personalAccessTokenSecret":"SECRET","site":{"contentUrl":"mysite"}}}'

Two values come back in the response, credentials.token and credentials.site.id. Keep both; the site ID is part of nearly every URL.

The token doesn't last. Per the Postman Salesforce Developers collection, a Tableau Cloud token is valid for 120 minutes and a Tableau Server token for 240 by default, which means anything running longer than two hours against Cloud needs token refresh.

How long a Tableau sign-in token lasts, Cloud and Server

When a job runs longer than two hours on Cloud, it starts failing with 401 errors partway through. Write it to sign in again rather than assume one token covers the run.

Separately, a PAT left unused for 15 days expires, so a monthly job needs a keep-alive or it'll fail on its first run after the gap.

Following the chart, the practical rule is to treat the token as disposable: obtain it at the start of a job, and re-authenticate on a 401.

Send the token and site ID back to list workbooks:

curl "https://YOUR-SERVER/api/3.22/sites/SITE-ID/workbooks" \
 -H "X-Tableau-Auth: TOKEN" -H "Accept: application/json"

If a list of workbooks comes back, the whole chain works. Then call POST /auth/signout so the session ends rather than idling until it expires.

Learn Tableau API endpoints by function

Once the session is signed in and out cleanly, the endpoints sort into families by the job they do. Knowing the family tells you which calls are safe to automate.

Alongside each family's purpose and typical use, the table says whether the family exists on Cloud, Server or both, so you can rule out a call before designing around it.

Family Purpose Typical use Availability
Auth Sign in, sign out, switch site Start and end every automation run Both
Sites Manage site settings Provisioning on Server Both; Cloud exposes only your own site
Users and groups Add, remove, set roles Sync from an identity provider Both
Projects Organise content Create folder structure per team Both
Workbooks and views Publish, download, query Deploy from staging to production Both
Data sources Publish and update connections Rotate credentials Both
Extract refresh and jobs Trigger and monitor refreshes Run after upstream loads finish Both
Permissions Grant or revoke access Apply a standard model to new content Both
Subscriptions Schedule delivery Bulk-create or clean up Both
Webhooks Notify external systems Alert on refresh outcomes Both

Permissions and refreshes in particular change state, and that is where production incidents start, so they get closer treatment below.

Publishing and permission calls are the most repeatable work. They're also the easiest to get wrong silently: a workbook published into the wrong project inherits that project's permissions, so a correct publish call can still expose the wrong audience.

Set the project first, then verify permissions after publishing.

A refresh call returns a job, not a result. Treat success as "the job was accepted" and poll the job until it finishes, otherwise your pipeline reports green while the extract is still stale or has failed.

A waiter sets a covered silver dome on a table and walks off; a diner ticks a notepad, while through a gap under the lid…

There is no per-call price for the REST API. The cost's the licence role of the account that signs in, which decides what that account can do. Confirm current terms with Tableau; this was last checked on 3 December 2026.

Easier to see it running than to read about it: set it up free, no card.

Understand API rate limits and quotas

You will not find a requests-per-minute figure in Tableau's documentation. It sets limits on file uploads, refresh concurrency and Metadata API query size, but it publishes no per-tier call rate for the REST API.

Anything you read about "requests per minute" for a given Cloud or Server tier didn't come from the docs.

Build for throttling you can't predict: back off on errors, and don't assume a quiet week means headroom.

It manages the server. Sign in, list and page through sites, projects, workbooks and data sources, publish content, move it between projects, change permissions, manage users and groups, and trigger or monitor extract refreshes.

Large publishes must be chunked, because a single upload has a size cap.

Page through every list call instead of assuming one response holds everything. A script that reads only page one will quietly miss content, and nobody notices until a permissions audit is wrong.

What it cannot do: querying data and building views

It doesn't return the rows behind a visualization as a general query service, and it doesn't author views. It can hand you a rendered image or a CSV of a view that already exists.

If you try to use it as a data pipeline, you hit export-size and refresh-concurrency limits. You end up debugging Tableau when the real problem is that you chose the wrong interface.

The other Tableau APIs and when to use each

  • The Metadata API, a GraphQL interface, answers lineage and "what depends on this column" questions, and it has its own query-size limit.
  • The Embedding API places existing views inside your own web pages.
  • The Hyper API creates and reads extract files directly, for pipelines that write data.
  • The VizQL Data Service queries published data sources programmatically.

Pick by the job: REST for administration, the others for data and presentation.

Handle common API errors

Because REST is an administration API, most of its errors describe the state of the server or your session, not a bad query, and each has a fixed response.

The table shows what to do on each one, and the retry column is the one that matters at 2 a.m.

HTTP status Documented code Cause Fix Retry?
400 400xxx family Malformed request body or parameter Correct the payload No
401 401xxx family Token expired or missing Sign in again Once, after re-sign-in
403 403xxx family Signed in, lacking permission Change permissions or the identity No
404 404xxx family Wrong ID, site or path Re-resolve the ID No
409 409xxx family Resource already exists or is in conflict Fetch the existing one No
Version mismatch Varies API version not supported by the server Pin a supported version No
Throttling None of its own Too many calls Back off Yes
Timeout None of its own Slow or overloaded server Reduce scope Yes, with backoff

Read the status first and the code second, since the codes in the table are grouped by their leading digits.

A 401 almost always means the session token lapsed mid-job. The VizQL Data Service documents only 2 codes under 401, so on that API sign-in is a narrow failure surface.

Where VizQL Data Service error codes cluster by HTTP status

On the same page, 2 codes sit under 403 and 3 under 404. A 403 means your identity is wrong, so retrying changes nothing. A 404 usually means a stale ID, so look it up again.

6 codes sit under 400 on the data API, the largest group. Those are request mistakes, so fix the body. REST failures are more often 409s and version mismatches, which a retry won't clear.

Retry only throttling and timeouts, with growing delays. On a 401, sign in once and replay the call. Check for the resource before any create, so a replay can't duplicate it.

Call the Tableau API without code using Activepieces

For the Tableau calls you would otherwise put in a cron job and then forget, a no-code workflow fits.

It fits them because each one is a short, repeatable sequence with a clear trigger. That's also where replays and duplicates stop being theoretical, so a visible, retryable flow is easier to debug than a script nobody remembers writing.

Which Tableau tasks suit a no-code workflow

Two jobs fit well. The first is triggering an extract refresh on a schedule, or when an upstream event says the source data has landed.

The second is alerting on failed jobs: poll the jobs endpoint, filter for failures, and post to a chat channel or open a ticket.

Both jobs are server-management work, which is what the REST API is built for.

Interactive or bulk data retrieval doesn't fit. If a flow is trying to pull large volumes of rows through the API, you're back to treating a server-management API as a data API, and a workflow builder won't fix that.

Before building anything, check the library below for a Tableau integration. Activepieces lists 751 integrations, counted from its MIT-licensed open source core, with a search bar and category filters to find the one you need.

One more thing matters here: the library also includes an HTTP integration, so if the connector doesn't expose the endpoint you need, the HTTP step can call it directly.

Activepieces connectors library listing 751 integrations in a filterable grid of pieces, including Webhook, Google Sheets, Gmail and HTTP

The grid shows that the Webhook and HTTP integrations sit alongside the app-specific ones, so an event-driven trigger and a raw REST call are both available without leaving the tool. Next comes wiring them into a single flow.

Activepieces workflow builder with HTTP request step selected and its settings panel open showing method, URL, headers, and…

Sign in, call and handle failures in one workflow

Build the flow as one sequence so the sign-in token never outlives the run:

  1. Trigger on a schedule or a webhook.
  2. Call the sign-in endpoint with the Tableau connector or an HTTP step, using a personal access token stored as a secret in Activepieces, never pasted into the step.
  3. Read the token and site ID from the response and pass the token in the X-Tableau-Auth header on every later call.
  4. Check whether a refresh task or job already exists before creating anything, so a retry doesn't duplicate it.
  5. Send the refresh request, then sign out.

Add a failure branch after each call. A rejected token usually means the sign-in step needs to run again, and a failed refresh should alert a person rather than retry silently.

A workflow builder showing a Skyvern step selected with its configuration panel open on the right, displaying API Key and…

You can open a failed run and see which call returned what, because each step's input and output is recorded per run. A bare script rarely leaves that debugging record behind.

Frequently asked questions

A run record shows what each call returned, but it can't settle the questions this article leaves open. Those are below, so check each against Tableau's current documentation before you build on it:

  • Can REST read the data behind a view?
  • How many personal access tokens (PATs) can one user hold? Tableau doesn't publish a figure I can cite.
  • What happens to a token after sign-out?
  • Which API version should you pin?
  • Does Cloud behave differently from Server?

The answers below cover the ones that come up most.

Cost and availability

Is the Tableau API free to use? The REST API comes with Tableau Server and Tableau Cloud, and I know of no separate API fee.

It does need a licensed user on the site, so your real cost is that license. Confirm the terms of your own contract.

Does the Tableau REST API work with Tableau Public? No, plan on it not working. The REST API manages sites, users and content on Server or Cloud, and Tableau Public has no site for you to administer. Scripts written against a Server won't carry over.

REST compared with the Metadata API

What's the difference between the REST API and the Metadata API? REST acts on resources: it publishes, moves, refreshes and deletes. The Metadata API's a GraphQL interface for reading relationships such as which fields, data sources and workbooks depend on each other.

Use REST to change things and Metadata to find out what a change will break.

Tokens and view data

The sign-in token expires; by default it lasts 120 minutes on Cloud and 240 minutes on Server, and a Server administrator can change this. Treat a rejected token as a signal to sign in again, and sign out when a job finishes.

Can I query the data behind a view with the REST API? You can export a view's data, for example as CSV, but you can't run queries against it.

That makes REST a way to fetch a rendered result, not to query a database. For analysis, connect to the underlying source.

Share

Get started

Automate this without code.

Cloud or your own servers.

Start free Talk to sales