To get started, review the requirements necessary to use the Tableau Metadata API.
In this section
To use the Tableau Metadata API, the following requirements must be met:
Note: The Metadata API is enabled automatically for Tableau Cloud sites with Data Management. If your site was upgraded from Standard, a site admin must turn on Catalog once. For more information, see Enable Tableau Catalog [↗].
The Metadata API is installed with Tableau Server but disabled by default.
A server admin must enable the Metadata API on Tableau Server using the tsm maintenance metadata-services enable command through the Tableau Services Manager (TSM) command line interface (CLI). For more information, see tsm maintenance [↗] topic in the Tableau Server Help.
Running the command begins initial ingestion, which is a component of the indexing process for the Metadata API.
tsm maintenance metadata-services enableNotes: When running this command, keep the following points in mind:
After the requirements have been met and the Metadata API has been enabled (for Tableau Server only) you can learn about the GraphQL schema or start querying the Metadata API.
To get the information you need from the Metadata API, you need to be able to write queries. Queries fetch metadata about the content published to your Tableau Cloud site or Tableau Server.
Before you can begin writing these queries, you need to understand what kind of Tableau Cloud or Tableau Server metadata is available through the Metadata API and the ways for accessing the metadata. For more information, see Understand the Metadata Model.
In general, any authorized user can query the Metadata API.
Tableau Cloud requires Data Management to access the Metadata API, but Tableau Server does not. This requirement started with Tableau Cloud October 2026. If you were using the Metadata API without Data Management at that time, you can continue doing so until June 2027.
On Tableau Server without Data Management, if “derived permissions” is enabled, users can see external assets related to their Tableau content. For more information about derived permissions:
Unlike a REST API, the Metadata API has only a single endpoint. To use the Metadata API, issue queries against this metadata api endpoint using GraphQL.
http://<server-name>/api/metadata/graphql
Note:
https://<server-name>/api/metadata/graphql is the API endpoint.https://<server-name>/metadata/graphiql/ is in-browser tool that you can use to query GraphQL.To form a query using GraphQL, you must specify the objects, and in some cases, objects within those objects until a unit of data can be returned.
query <query-name>{
<object> (<arguments>){
<attribute>
<attribute>{
<attribute>
}
}
}
query useMetadataApiToQueryOrdersDatabases{
databases (filter: {name: "adventureworks"}){
name
tables{
name
}
}
}
For more query examples, see the Example Queries topic.
You typically submit GraphQL queries using POST and an HTTP Content-Type header of application/json, with the JSON-encoded query in the HTTP request body. A typical HTTP request body with a JSON-encoded simple GraphQL query might look like:
{"query":"query myquery{databases {name id}}"}
You can also submit GraphQL queries using POST and an HTTP Content-Type header of application/graphql. A typical HTTP request body with the same simple GraphQL query as above would be:
query myquery{databases {name id}}
You can also submit GraphQL queries using GET and a querystring, with no request body at all. The querystring is a field-value pair where the field is query and the value is the GraphQL query, URL encoded. A typical HTTP request using the same simple GraphQL query as above would result in a URI and querystring like:
https://tableau.example.com/api/metadata/graphql?query=query%20myquery%7Bdatabases%7Bname%20id%7D%7D'
For more information on typical GraphQL requests and expected interactions, see HTTP Methods, Headers, and Body [↗] on the GraphQL.org website.
The query returns only the data you specify in same shape as your query.
For the query example used above, you will see the following query response.
{
"data": {
"databases": [
{
"name": "adventureworks",
"tables": [
{
"name": "AWBuildVersion"
}
]
},
{
"name": "adventureworks",
"tables": [
{
"name": "SalesTerritory"
},
{
"name": "Department"
},
{
"name": "Culture"
},
{
"name": "Address"
},
{
"name": "Product"
}
]
},
{
"name": "adventureworks",
"tables": [
{
"name": "CustomerAddress"
},
{
"name": "Address"
},
{
"name": "Customer"
}
]
}
]
}
}
Your query results are scoped to the permissions you’ve been granted. For more information, see How Permissions Work topic.
See Common Errors topic.
One way to quickly get started with GraphQL queries and explore the Metadata API is to test queries against the schema. You can explore the schema using GraphiQL, which is an interactive in-browser tool. You can change the query as you like and see the results immediately.
Note: To access GraphiQL, you must sign in (authenticate) to your Tableau Cloud site or Tableau Server. The data you can see, specifically about external assets, is scoped to the permissions you’ve been granted. Tableau Cloud requires Data Management to access GraphiQL, but Tableau Server does not.
/metadata/graphiql/.com”..com” and press ENTER or RETURN.For example, if your site’s name is “MYCO” and the site URL is:
https://us-west-2b.online.tableau.com/#/site/MYCO/explore
The GraphiQL tool URL is:
https://us-west-2b.online.tableau.com/metadata/graphiql/
Note:
https://<server-name>/api/metadata/graphql is the API endpoint.https://<server-name>/metadata/graphiql/ is in-browser tool that you can use to query GraphQL.The GraphiQL query tool is comprised of several parts.
