Note: This Tableau report displays plant data between 2019-01-01 and 2019-03-31.
This example assumes you are creating Tableau reports in Tableau Desktop or Tableau Public. The embedded report was published and read from Tableau Public Server.
To make a successful API call, the following 3 items are required:
bearer tokento authorize the API call
Web Data Connectoras Data Source
query parameters(ie., API request URL) to identify a subset of the data
bearer token is required for all API calls. To generate a token go to the Generate Access Token method on our API documentation, enter your IIR user credentials and desired Token Lifetime, and click
TRY. If successful you will get a response similar to this:
The token can be found by clicking the "Response Headers" tab and copying the text after "authorization: Bearer ", as highlighted in the adjacent image.
The IIR API does not support token lifetimes of more than 30 days. Tableau will cache results and prevent you from suddenly having a blank report, but if you need it to always be up-to-date you'll need to keep that token current. Make sure that you have a plan in place to update the access token on a monthly basis.
Using the Web Data Connector option in Tableau requires one to have built it out first. A web data connector is a piece of wrapper code that preps your web data for consumption by Tableau. Once that is developed, you can use the connector from within Tableau to connect to it, and the URL that represents the connector is what you need to use. For more information, see
Tableau Help - Web Data Connector
New Data Sourcein Tableau. Click
Web Data Connector.
A basic API Call is suitable for returning small result-sets of a known size. For summary or reference list endpoints the upper limit is 1000, for detail endpoints the upper limit is 50. This example is going to query the
plants/summary endpoint to get a list of summarized plants based on the
query parameters sent to the endpoint.
Query parameters being used in this example include:
Advanced +and paste your API Token as the
Postand not Get.
Data Sourceview, go to
Background Maps, etc.
Here is a list of know limitations for connecting via Web Data Connector: