Options
All
  • Public
  • Public/Protected
  • All
Menu

Tableau Extensions

Tableau Extensions API

The Tableau Extensions API is a JavaScript library that is organized into namespaces that contain the classes and methods for communicating with Tableau components. The Tableau Extensions API library supports both dashboard extensions and viz extensions, although not all interfaces and methods apply to both extensions. For an overview of how the API is organized, see Tableau Extensions API Basics.

Note: To see all the methods and properties for the Extensions API interfaces, select the Inherited option in the upper-right corner of your browser window. This option shows any methods and properties inherited from base classes.
Namespace Description
Tableau The top-level or global namespace is the tableau namespace, which has no constructs, but contains the extensions namespace. You use the tableau namespace to access the extensions. For example, you call tableau.extensions.initializeAsync() to initialize the API.
Extensions The extensions namespace is the namespace for Tableau extensions. A dashboard extension is one type of extension. A dashboard extension has access to the dashboardContent namespace, and all of the objects and classes of the dashboard. Some namespaces, like the settings, environment, and ui are available to all extensions.
DashboardContent (Available to dashboard extensions only) The dashboardContent provides access to the dashboard object. When you have the dashboard object, you have access to all elements in the dashboard, including the worksheets, marks, filters, parameters, and data sources. For example, to access the worksheets in a dashboard (after initialization), you might have a line of code that looks like the following:
const worksheets = tableau.extensions.dashboardContent.dashboard.worksheets
WorksheetContent (Available to viz extensions only) The worksheetContent provides access to the worksheet object. When you have the worksheet object, you have access to all elements in the worksheet, including the worksheets, marks, filters, parameters, and data sources. For example, to access the worksheet in a workbook (after initialization), you might have a line of code that looks like the following:
const worksheet = tableau.extensions.worksheetContent.worksheet
Settings The settings namespace provides methods to get and set values which will be persisted in a workbook. You can use the settings to configure an extension.
Environment The environment namespace provides methods to programmatically gather information about the environment in which the extension is running.
UI The ui namespace provides methods for an extension to display a popup dialog window.

Dashboard extensions

The following diagram shows the relationship between the extensions namespace and the worksheets in the dashboard. For more information, see Tableau Extensions API Basics.

Extensions API namespace hierarchy


Viz extensions

The following diagram shows the relationship between the extensions namespace and the worksheets in the workbook. For more information, see Tableau Extensions API Basics.

Viz Extensions API namespace hierarchy