In this blog, we are going to explain what Automating Tableau Server means and why do we need to do this. And then a little information on how we can learn about it.
What is Tableau Rest API?
REST APIs allow you to interact with Tableau Server to perform actions without using the Tableau Server UI. They allow you to programmatically access your Tableau Server and work with data sources, content, projects, site users, workbooks and flows, etc.
Using these APIs, you can create your custom application/flow to interact with Tableau Server.
Why should we automate Tableau Server?
There must be a question popping up in your mind that why should we automate the Tableau Server. Let suppose say you are a company that is providing tableau insights to many of your clients around 30-50 and you are using the same template workbook for all of them. The only different thing is the data source that is being used within that workbook. Each client would have individual data sources.
After developing the template workbook if you would deploy the workbook and data sources for each client using Tableau Server UI then it would hours to achieve the target.
This is where Tableau REST APIs come to the rescue. With Python, you can write a script in which you can make requests to tableau APIs to perform actions.
Automating Tableau Server using REST API and Python.
How to get started with REST APIs?
There is full documentation available on Tableau’s official help page: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api.htm
In this documentation, each method is explained in detail on how to call each method using the REST API with an example.
Before directly using the API in your python script you can first test the API by calling it from POSTMAN.
The official document can be difficult to understand for beginners. So, there is another amazing alternative to this is a library Tableau Server Client which is built upon these REST APIs.
This library also has proper documentation, and it makes it easy for us to use each method.
Steps of a simple Use Case:
- Download workbook & data source.
- Create site.
- Assign users to that site.
- Create project.
- Publish workbook & data source.
- Assign permissions.
The Team at Insights Pro is always there to help you with this. Just drop us an email at firstname.lastname@example.org for further details on it.