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 on a site.

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

view details

Get ask data lens

Get the details of the specified ask data lens. > Permissions - This method can be called by users who have read access to the lens. > Introduced Tableau Online June 2022. Not currently available for Tableau Server.

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.

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

view details

List ask data lenses in site

Returns a list of ask data lenses in a site. > Permissions - This method can be called by any user. Responses will include only the lenses to the user has access to. > Introduced Tableau Online June 2022. Not currently available for Tableau Server.

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

view details


Thanks for your feedback!