Introduction to Tableau Metadata API

The Tableau Metadata API discovers and indexes all of the content on your Tableau Online site or Tableau Server, including workbooks, data sources, flows, and metrics. Indexing is used to gather information about Tableau content, or metadata, about the schema and lineage of the content. Then from the metadata, Metadata API identifies all of the databases, files, and tables used by the content on your Tableau Online site or Tableau Server.

You can do the following tasks using the Metadata API:

In this section

What is Tableau metadata?

The Metadata API discovers, tracks, stores, and then surfaces information about Tableau content.

The content can be categorized by type (e.g., table or workbook). The content can be unique to Tableau (e.g., embedded data sources and calculated fields) and its exeternal assets not unique to Tableau (e.g., database tables and columns). Both content and external assets can have information attached to them (e.g., tags and ratings). Both content and external assets can also have relationships to other content and external assets.

The relationships among the content and external assets and the information about each is the metadata.

Metadata API and GraphQL

The Metadata API uses GraphQL, a query language for APIs that describes how to ask for and return only the data that you’re interested in.

For general information about GraphQL and what you can do with it, see

When to use the Metadata API?

The Metadata API is fast and flexible. Use the Metadata API when you are looking to find out specific information about the relationships between content and assets or their structures.

When to use the Tableau REST API?

With regard to metadata, you can use the Tableau REST API to make similar queries as with the Metadata API. However, if your Tableau Online site or Tableau Server is licensed with the Data Management Add-on, you can use the REST API to perform various write operations, such as add, update, or remove external assets; and add additional metadata to the external assets like descriptions, certifications, and data quality warnings. For more information, see Metadata Methods topic in the Tableau REST API.

Note: You can always use the Tableau REST API for additional tasks like publishing workbooks or data sources, or for administrative tasks, such as creating groups and adding or removing users.

Differences between using GraphQL and REST

If you’re familiar with REST APIs then you understand the concepts of endpoints (or resources) and HTTP requests. For example, if you are using the Tableau REST API and you want to find all the workbooks on your Tableau Online site or Tableau Server, you can make a GET request to return that information. If you want to find out something else, you need to make another request to a different endpoint.

Like REST APIs, GraphQL is also served over HTTP. However, instead of sending requests to multiple endpoints to return the data of interest, you can make one query to one endpoint and have that filtered to return only what you ask for. A GraphQL server is associated with one endpoint.

GraphQL is based on the concept of a graph (queries) and the relationship between the types (objects) defined by the GraphQL schema.