Introduced: Tableau Online June 2022. Not currently available for Tableau Server.

Ask data lenses enable you to refine the way a user's natural language query is interpreted, based on the specific audience they belong to. For instance, you might make one lens for medical staff at a hospital, and another for administrative staff. A lens allows you to define synonyms to associate key words with common terms used for them. For instance, "SF" for "San Francisco", or "Rx" for "prescription". You can also configure recommended visualizations for each lens.

Using the Tableau REST API, you can:

  • Create a lens and configure its properties
  • Delete a lens
  • Import an existing lens
  • Get a list of lenses on a site or the details of a specified lens

Create ask data lens

Create an ask data lens.

Version: Available in API 3.16 ( Tableau Cloud June 2022 / Server 2022.3) and later. Version Overview

Permissions: This method can be called by users who have Create permissions for lenses on the site. Permissions Overview

License: No additional license required.

Access Scope: Not available. Tableau Cloud | Tableau Server-Windows | Tableau Server-Linux

POST {server}/api/-/askdata/lenses

view details

Delete ask data lens

Delete an ask data lens.

Version: Available in API 3.16 ( Tableau Cloud June 2022 / Server 2022.3) and later. Version Overview

Permissions: This method can be called by users with administrator and lens owner permissions. Permissions Overview

License: No additional license required.

Access Scope: Not available. Tableau Cloud | Tableau Server-Windows | Tableau Server-Linux

DELETE {server}/api/-/askdata/lenses/{lens_id}

view details

Get ask data lens

Get the details of the specified ask data lens.

Version: Available in API 3.16 ( Tableau Cloud June 2022 / Server 2022.3) and later. Version Overview

Permissions: This method can be called by users who have Read access to the lens. Permissions Overview

License: No additional license required.

Access Scope: Not available. Tableau Cloud | Tableau Server-Windows | Tableau Server-Linux

GET {server}/api/-/askdata/lenses/{lens_id}

view details

Import ask data lens

Import an existing ask data lens on a server to a site, and optionally transform the metadata of the lens in the process.

Version: Available in API 3.16 ( Tableau Cloud June 2022 / Server 2022.3) and later. Version Overview

Permissions: This method can only be called by server administrators or site administrators. Permissions Overview

License: No additional license required.

Access Scope: Not available. Tableau Cloud | Tableau Server-Windows | Tableau Server-Linux

POST {server}/api/-/askdata/lenses/import

view details

List ask data lenses in site

Returns a list of ask data lenses in a site.

Version: Available in API 3.16 ( Tableau Cloud June 2022 / Server 2022.3) and later. Version Overview

Permissions: This method can be called by any user. Responses will include only the lenses to the user has access to. Permissions Overview

License: No additional license required.

Access Scope: Not available. Tableau Cloud | Tableau Server-Windows | Tableau Server-Linux

GET {server}/api/-/askdata/lenses

view details


Thanks for your feedback!