Tableau has an ever-growing list of Application Programming Interfaces (APIs) that we as developers can leverage to add functionality to Tableau; personally speaking, this is the most exciting part of the Tableau ecosystem. In this article, I want to highlight the various APIs out there which are available for you to use.
Application Programming Interfaces (APIs)
In computer programming, an application programming interface (API) is a set of subroutine definitions, communication protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication among various components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer. So in English, this means a set of tools that can be used to build things based on defined functionality.
JavaScript API
JavaScript, often abbreviated as JS, is a high-level, interpreted programming language that conforms to the ECMAScript specification. Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide Web. JavaScript enables interactive web pages and is an essential part of web applications. The vast majority of websites use it, and major web browsers have a dedicated JavaScript engine to execute it.
Tableau Public, Online and Server support the ability to use JavaScript to integrate Tableau Visualisations into your own applications.
Read More:
- Tableau JavaScript API: https://onlinehelp.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api.htm
Tableau Magic Article:
- Tableau Javascript API an Introduction: https://tableau.toanhoang.com/tableaus-javascript-api-an-introduction
Extension API
The Tableau Extensions API allows developers can create dashboard extensions that enable customers to integrate and interact with data from other applications directly in Tableau; you can create additional visual components, integrate with applications, or even write back to a database. We see a lot of growth in this area in the future and it will be something that more and more people will want to use.
Read More:
- Extension API on Github: https://tableau.github.io/extensions-api
- Extension Gallery: https://extensiongallery.tableau.com
- Use Dashboard Extensions: https://onlinehelp.tableau.com/current/pro/desktop/en-gb/dashboard_extensions.htm
Tableau Magic Articles:
- Creating a Tableau Extension Part One: https://tableau.toanhoang.com/creating-a-tableau-extensions-part-one
- Creating a Tableau Extension Part Two: https://tableau.toanhoang.com/creating-a-tableau-extension-part-two
- Creating a Tableau Extension Part Three: https://tableau.toanhoang.com/creating-a-tableau-extension-part-three
- Creating a Tableau Extension Part Four: https://tableau.toanhoang.com/creating-a-tableau-extension-part-four
REST API
Representational State Transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services (RWS), provide interoperability between computer systems on the Internet. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. Other kinds of Web services, such as SOAP Web services, expose their own arbitrary sets of operations.
With the Tableau Server REST API, you can manage and change Tableau Server resources programmatically, using HTTP. The API gives you simple access to the functionality behind the data sources, projects, workbooks, site users, and sites on a Tableau server. You can use this access to create your own custom applications or to script interactions with Tableau Server resources.
Read More:
Tableau UI
The Tableau UI is a React component library containing UI components which have the look-and-feel of Tableau. React is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications, as it is optimal for fetching rapidly changing data that needs to be recorded.
Read More:
- Tableau UI: https://tableau.github.io/tableau-ui
Tableau Magic Articles:
- Tableau UI / An Introduction: https://tableau.toanhoang.com/tableau-ui-an-introduction
Webhooks (Developer Preview)
Webhooks let you build custom applications or workflows that react to events that happen in Tableau Online. For example, you could use webhooks to send an SMS or Slack notification any time a data source refresh fails, or fire off a confetti cannon when a new workbook is created. For the initial release of this developer preview, webhooks are supported for data source and workbook events only.
You configure each webhook to subscribe to an event in Tableau. Then, when the event occurs, an HTTP POST request will be sent to the public URL you specified. This POST request includes a JSON payload that includes information about the event. The payload includes the ID of the object in question so that the Tableau REST API can be used to get additional information or take further action.
Read More:
- Webhooks Documentation: https://github.com/tableau/webhooks-docs
Web Data Connector (WDC) API
A Web Data Connector (WDC) is a collection of HTML and JavaScript that allows you to connect to a data source and passes this information to Tableau. While Tableau has a host of in-built connectors, if you have an in-house application, or accessing a system where a native connector does not exist yet, building your own WDC will be a valuable skill to know.
Read More:
- Web Data Connector: https://tableau.github.io/webdataconnector
Tableau Magic Article:
- Creating a Web Data Connector Part 1: https://tableau.toanhoang.com/creating-a-web-data-connector-part-1
Extract API
The Extract API 2.0 contains a set of functions for creating extracts. Using the Extract API you can 1) create and populate extract (.hyper) files to improve performance and provide offline access to your data sources, 2) write a program that connects to data sources that are not currently supported by Tableau, and then write the data into a .hyper file for use later by Tableau, and 3) write a program to create an extract that contains multiple tables.
Read More:
- Extract 2.0 API: https://onlinehelp.tableau.com/current/api/extract_api/en-us/Extract/extract_api.htm
Document API
The Document API provides a supported way to programmatically make updates to Tableau workbook and data source files. If you’ve been making changes to these file types by directly updating the XML–that is, by XML hacking–this SDK is for you.
Read More:
- Document API Python: http://tableau.github.io/document-api-python
Note: It looks like the GitHub repository has not been modified in 3 years.
Summary
If you want to know more about how Tableau APIs can help you in your day to day work, send me an email at admin@tableau.toanhoang.com to learn more.
As always, I hope you all enjoyed this article as much as I enjoyed writing it and as always do share the love. Do let me know if you experienced any issues recreating this Visualisation, and as always, please leave a comment below or reach out to me on Twitter @Tableau_Magic.
If you like our work, do consider supporting us on Patreon, and for supporting us, we will give you early access to tutorials, exclusive videos, as well as access to current and future courses on Udemy:
- Patreon: https://www.patreon.com/tableaumagic
Also, do be sure to check out our various courses:
- Creating Bespoke Data Visualizations (Udemy)
- Introduction to Tableau (Online Instructor-Led)
- Advanced Calculations (Online Instructor-Led)
- Creating Bespoke Data Visualizations (Online Instructor-Led)