Understanding Interaction with Tableau API

This article provides answers to the most frequently asked questions about the Metric Insight's integration with Tableau.

Why Is It Not Possible to Use SAML Account for Initial Auth?

To integrate with Tableau properly, a non-SAML account must be used for authentication:

  • SAML single sign-on (SSO) authentication does not validate REST API requests. For more information, refer to Authentication-Tableau Server REST API
  • Tableau APIs work as standalone services with their own sessions. Even if the Plugin logs in with SAML, API will not accept this session.

How Does the Plugin Log in and Get Token?

Get token via REST API:

<server_url>/api/<api_version>/auth/signin –  get token

Log in to Web API:

<server_url>/auth?format=xml – get auth XML to get login URL and auth token

<server_url>/vizportal/api/clientxml/auth/login – get token

Trusted Auth (for Web API only):

<server_url_with_port>/trusted  – get trusted ticket

What Calls Does Metric Insights Make to Tableau API?

REST API

<server_url>/api/<api_version>/sites/%s/users – get users

<server_url>/api/<api_version>/sites – get Sites

<server_url>/api/<api_version>/sites/<site_id>/projects – get Projects

<server_url>/api/<api_version>/sites/<site_id>/users/<user_id>/workbooks –  get Workbooks

<server_url>/api/<api_version>/sites/<site_id>/workbooks/<workbook_id>/views?includeUsageStatistics=<is_include_metadata> –  get views for a Workbook

<server_url>/api/<api_version>/sites/<site_id>/views?includeUsageStatistics=<is_include_metadata> –  get views for a Site

<server_url>/api/<api_version>/sites/<site_id>/views/data –  get query, get CSV, get schema

<server_url>/api/<api_version>/sites/<site_id>/views/data – get image for a View

<server_url>/api/<api_version>/sites/<site_id>/workbooks/<workbook_id>/pdf –  get PDF for a Workbook  

<server_url>/api/<api_version>/sites/<site_id>/workbooks/<workbook_id>/content –  get metadata

<server_url>/api/<api_version>/sites/<site_id>/workbooks/<workbook_id>/connections –  get "Last update time"

<server_url>/api/<api_version>/sites/<site_id>/views/pdf –  get PDF for a View

<server_url>/api/<api_version>/sites/<site_id>/workbooks/<workbook_id>/powerpoint – get PPT for a Workbook PPT

Web API

<server>/views/<view_id> – get data from a View

<server>/t/<site_id>/views/<view_id> – get data from a View

<server>/trusted/<trusted_ticket>/views/<view_id> – get data from a View with trusted ticket

<server>/trusted/<trusted_ticket>/t/<site_id>/views/<view_id> –  get data from a View with trusted ticket

How Are REST and WEB APIs Used for Different Aspects of the Integration?


Capability REST API Web API
Auth with Login and Password
✔️
✔️
Auth with Personal Access Tokens ✔️

Trusted Auth

✔️
Getting objects hierarchy
✔️

Getting additional metadata (owner, last update time, etc.)
✔️

Getting content
Getting data for a View with pre-filtering
✔️
✔️
Getting image for a View with pre-filtering
✔️
✔️
*provides for getting better-quality images
Getting PDF for a View with pre-filtering
✔️
✔️
Getting PDF for a Workbook
✔️