---
schema_version: "1"
id: 318bc166f50910656cec2940075c40a30ce9e1fd9222204072e3921743ea6dc0
title: VizQL Data Service
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/vizql-data-service/reference/index.md
canonical_url: https://help.tableau.com/v0.0/api/vizql-data-service/en-us/reference/index.html
source_site: help.tableau.com
content_type: documentation
content_hash: 7acf190cc2e9b9bd0f413e77f0ff6732920428d0212620a54074e772df3a2ccc
---
- VizQL Data Service Guide
- postRequest data source metadata
- postQuery data source
- getSend a simple request
- postRequest data source model
- postList supported Tableau functions for a datasource

[API docs by Redocly](https://redocly.com/redoc/)

# VizQL Data Service (1.0)

An API to query Tableau published data sources

[▷ Download the OpenAPI spec for these operations.](https://help.tableau.com/v0.0/api/vizql-data-service/en-us/docs/vds_openapi_schema.html).

# [](#tag/VizQL-Data-Service-Guide)VizQL Data Service Guide

[▷ View the VizQL Data Service Guide](https://help.tableau.com/v0.0/api/vizql-data-service/en-us/index.html).

## [](#operation/ReadMetadata)Request data source metadata

Requests metadata for a specific data source. The metadata provides information about the data fields, such as field names, data types, and descriptions.

##### Authorizations:

_XTableauAuth_

##### Request Body schema: application/json

<table class="sc-hIPBNq kHkWhD"><tbody><tr class=""><td kind="field" title="datasource" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand datasource"><span class="property-name">datasource</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div class="sc-gUjWJS sc-eKzvBH itHPsH ciWJhv">required</div></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->Datasource<!-- -->) </span></div> <div><div html="" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"></div></div></div></td></tr><tr class="last"><td kind="field" title="options" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand options"><span class="property-name">options</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->QueryOptions<!-- -->) </span></div> <div><div html="<p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"><p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
</div></div></div></td></tr></tbody></table>

### Responses

**200**

200 response

**default**

Unexpected error

post/read-metadata

/vizql-data-service/v1/read-metadata

### Request samples

- Payload

Content type

application/json

Copy

Expand all Collapse all

`{  - "datasource": {          - "datasourceLuid": "string",     - "workbookDatasourceId": "string",     - "connections": [                  - {                          - "connectionLuid": "string",             - "connectionUsername": "string",             - "connectionPassword": "string"                          }                  ]          }, - "options": {          - "debug": false,     - "bypassMetadataCache": false,     - "withNewSession": false,     - "interpretFieldCaptionsAsFieldNames": false,     - "includeHiddenFields": false,     - "includeGroupFormulas": false          }  }`

### Response samples

- 200
- default

Content type

application/json

Copy

Expand all Collapse all

`{  - "data": [          - {                  - "fieldName": "string",         - "fieldCaption": "string",         - "dataType": "UNSPECIFIED",         - "fieldRole": "UNSPECIFIED",         - "fieldType": "UNSPECIFIED",         - "defaultAggregation": "UNSPECIFIED",         - "columnClass": "UNSPECIFIED",         - "formula": "string",         - "groupFormula": {                          - "baseFieldName": "string",             - "groupings": [                                  - {                                          - "alias": "string",                     - "members": [                                                  - null                                                  ]                                          }                                  ],             - "hasIncludeOther": false                          },         - "logicalTableId": "string",         - "description": "string",         - "imageRole": "UNSPECIFIED",         - "hidden": true,         - "defaultFormatting": {                          - "decimalPlaces": "string"                          },         - "isLODCalc": true,         - "aliases": [                          - {                                  - "member": null,                 - "value": null                                  }                          ]                  }          ], - "extraData": {          - "parameters": [                  - {                          - "parameterType": "UNSPECIFIED",             - "parameterName": "string",             - "parameterCaption": "string",             - "dataType": "UNSPECIFIED",             - "value": null                          }                  ]          }  }`

## [](#operation/QueryDatasource)Query data source

Queries a specific data source and returns the resulting data.

##### Authorizations:

_XTableauAuth_

##### Request Body schema: application/json

<table class="sc-hIPBNq kHkWhD"><tbody><tr class=""><td kind="field" title="datasource" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand datasource"><span class="property-name">datasource</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div class="sc-gUjWJS sc-eKzvBH itHPsH ciWJhv">required</div></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->Datasource<!-- -->) </span></div> <div><div html="" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"></div></div></div></td></tr><tr class=""><td kind="field" title="query" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand query"><span class="property-name">query</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div class="sc-gUjWJS sc-eKzvBH itHPsH ciWJhv">required</div></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->Query<!-- -->) </span></div> <div><div html="<p>The query is the fundamental interface to the VizQL Data Service. It holds the specific semantics to perform against the data source. A query consists of an array of fields to query against, and an optional array of filters to apply to the query.</p>
" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"><p>The query is the fundamental interface to the VizQL Data Service. It holds the specific semantics to perform against the data source. A query consists of an array of fields to query against, and an optional array of filters to apply to the query.</p>
</div></div></div></td></tr><tr class="last"><td kind="field" title="options" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand options"><span class="property-name">options</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->QueryDatasourceOptions<!-- -->) </span></div> <div><div html="<p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"><p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
</div></div></div></td></tr></tbody></table>

### Responses

**200**

200 response

**default**

Unexpected error

post/query-datasource

/vizql-data-service/v1/query-datasource

### Request samples

- Payload

Content type

application/json

Copy

Expand all Collapse all

`{  - "datasource": {          - "datasourceLuid": "string",     - "workbookDatasourceId": "string",     - "connections": [                  - {                          - "connectionLuid": "string",             - "connectionUsername": "string",             - "connectionPassword": "string"                          }                  ]          }, - "query": {          - "fields": [                  - {                          - "fieldCaption": "string",             - "fieldAlias": "string",             - "maxDecimalPlaces": 0,             - "sortDirection": "ASC",             - "sortPriority": 1                          }                  ],     - "filters": [                  - {                          - "field": {                                  - "fieldCaption": "string"                                  },             - "filterType": "QUANTITATIVE_DATE",             - "context": false                          }                  ],     - "parameters": [                  - {                          - "parameterCaption": "string",             - "value": null                          }                  ]          }, - "options": {          - "debug": false,     - "bypassMetadataCache": false,     - "withNewSession": false,     - "interpretFieldCaptionsAsFieldNames": false,     - "includeHiddenFields": false,     - "includeGroupFormulas": false,     - "disaggregate": false,     - "returnFormat": "OBJECTS",     - "rowLimit": 1,     - "returnServerSentEvents": false          }  }`

### Response samples

- 200
- default

Content type

application/jsontext/event-streamapplication/json

Copy

Expand all Collapse all

`{  - "data": [          - null          ], - "error": { }  }`

## [](#operation/SimpleRequest)Send a simple request

Sends a request that can be used for testing or doing a health check.

### Responses

**200**

200 response

get/simple-request

/vizql-data-service/v1/simple-request

### Response samples

- 200

Content type

application/json

Copy

`"string"`

## [](#operation/GetDatasourceModel)Request data source model

Requests the data model for a specific data source. The data model provides information about the structure and relationships in the data source.

##### Authorizations:

_XTableauAuth_

##### Request Body schema: application/json

<table class="sc-hIPBNq kHkWhD"><tbody><tr class=""><td kind="field" title="datasource" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand datasource"><span class="property-name">datasource</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div class="sc-gUjWJS sc-eKzvBH itHPsH ciWJhv">required</div></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->Datasource<!-- -->) </span></div> <div><div html="" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"></div></div></div></td></tr><tr class="last"><td kind="field" title="options" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand options"><span class="property-name">options</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->QueryOptions<!-- -->) </span></div> <div><div html="<p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"><p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
</div></div></div></td></tr></tbody></table>

### Responses

**200**

200 response

**default**

Unexpected error

post/get-datasource-model

/vizql-data-service/v1/get-datasource-model

### Request samples

- Payload

Content type

application/json

Copy

Expand all Collapse all

`{  - "datasource": {          - "datasourceLuid": "string",     - "workbookDatasourceId": "string",     - "connections": [                  - {                          - "connectionLuid": "string",             - "connectionUsername": "string",             - "connectionPassword": "string"                          }                  ]          }, - "options": {          - "debug": false,     - "bypassMetadataCache": false,     - "withNewSession": false,     - "interpretFieldCaptionsAsFieldNames": false,     - "includeHiddenFields": false,     - "includeGroupFormulas": false          }  }`

### Response samples

- 200
- default

Content type

application/json

Copy

Expand all Collapse all

`{  - "logicalTables": [          - {                  - "logicalTableId": "string",         - "caption": "string",         - "description": "string"                  }          ], - "logicalTableRelationships": [          - {                  - "fromLogicalTable": {                          - "logicalTableId": "string"                          },         - "toLogicalTable": {                          - "logicalTableId": "string"                          },         - "expression": {                          - "op": "string",             - "relationships": [                                  - {                                          - "operator": "=",                     - "fromField": "string",                     - "toField": "string"                                          }                                  ]                          }                  }          ]  }`

## [](#operation/ListSupportedFunctions)List supported Tableau functions for a datasource

Returns the list of Tableau function names supported for the specified datasource. The 200 response is an array of strings. Example response: \["SUM", "AVG", "MIN", "MAX"\].

##### Authorizations:

_XTableauAuth_

##### Request Body schema: application/json

required

<table class="sc-hIPBNq kHkWhD"><tbody><tr class=""><td kind="field" title="datasource" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand datasource"><span class="property-name">datasource</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div class="sc-gUjWJS sc-eKzvBH itHPsH ciWJhv">required</div></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->Datasource<!-- -->) </span></div> <div><div html="" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"></div></div></div></td></tr><tr class="last"><td kind="field" title="options" class="sc-hABBmJ sc-fHejqy sc-jiaSqj cqoAxn hfWKVF gIkRoy"><span class="sc-ifyrAs hIHfpT"></span><button aria-label="expand options"><span class="property-name">options</span><svg class="sc-eTNRI jIsRbK" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button></td><td class="sc-blmEgr berbbf"><div><div><span class="sc-gUjWJS sc-kZOsHZ itHPsH iSyacY"></span><span class="sc-gUjWJS sc-iLXxbI itHPsH gfdSsP">object</span><span class="sc-gUjWJS sc-jgraLO itHPsH iUxudT"> (<!-- -->QueryOptions<!-- -->) </span></div> <div><div html="<p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg"><p>Some optional metadata that can be used to adjust the behavior of an endpoint.</p>
</div></div></div></td></tr></tbody></table>

### Responses

**200**

List of supported function object for the datasource

**default**

Unexpected error

post/list-supported-functions

/vizql-data-service/v1/list-supported-functions

### Request samples

- Payload

Content type

application/json

Copy

Expand all Collapse all

`{  - "datasource": {          - "datasourceLuid": "string",     - "workbookDatasourceId": "string",     - "connections": [                  - {                          - "connectionLuid": "string",             - "connectionUsername": "string",             - "connectionPassword": "string"                          }                  ]          }, - "options": {          - "debug": false,     - "bypassMetadataCache": false,     - "withNewSession": false,     - "interpretFieldCaptionsAsFieldNames": false,     - "includeHiddenFields": false,     - "includeGroupFormulas": false          }  }`

### Response samples

- 200
- default

Content type

application/json

Copy

Expand all Collapse all

`[  - {          - "name": "string",     - "overloads": [                  - {                          - "arg_types": [                                  - "UNSPECIFIED"                                  ],             - "return_type": "UNSPECIFIED"                          }                  ]          }  ]`