Configuration


🕐 4 min read

Assign API access capability

To query a data source with VizQL Data Service (VDS), you must first assign the API Access capability in the Permission dialog. For information about setting up this data source capability in the Tableau user interface, see the Permission Capabilities and Templates topic in either Tableau Cloud Help or Tableau Server Help.

For information about setting up this data source capability using the REST API, see Permissions.

Configure authentication

VDS requires that you send an authentication token with each request. The token lets Tableau Cloud or Tableau Server verify your identity and makes sure that you’re signed in. To get a token, you can call the Tableau REST API Sign In method, in one of three ways.

Sign in using a personal access token (PAT)

To sign in using a PAT, see Make a Sign In Request with a Personal Access Token in the Tableau REST API Help for more information.

Sign in using a JSON web token (JWT)

If you use a JWT, set the scope (scp) in the JWT to tableau:viz_data_service:read. The permissions of the user in the JWT determine query results.

See Make a Sign In Request with a JWT in the Tableau REST API Help for more information on using a JWT to create a credentials token that you can use with VDS.

Sign in using username and password

See Make a Sign In Request with Username and Password in the Tableau REST API Help for more information.

For information about token expiration, changing the token timeout value, and more, see Using the Authentication Token In Subsequent Calls in the Tableau REST API Help.

Find the data source LUID

To run a VDS method, you must know the locally unique identifier (LUID) of the published data source you’re requesting information about. There are two options for finding the data source LUID.

Option 1: Get the LUID using Tableau Cloud or Tableau Server

  1. In the Tableau navigation menu, select Explore.
  2. At the top of the Explore screen, select All Data Sources in the dropdown menu.
  3. In the list of data sources, select the data source you want the LUID for.
  4. On the data source page, select the Details icon (Details icon) next to the data source name.

The LUID is at the bottom of the Data Source Details screen.

Tableau Data Source Details screen with the data source LUID emphasized

Option 2: Get the LUID using the Tableau REST API

Use the Query Data Sources method to return a list of data sources on your site. This method returns the official data source name in the contentURL attribute. The associated id of the contentURL is your data source LUID.