Display the View with the Ticket

After you create the POST request, you need to write code that provides the web server with the view’s location and the ticket from Tableau Server. It will use this information to display the view. How you specify it depends on whether the view is embedded, and if Tableau Server is running multiple sites.

Tableau Server View Examples

Here’s an example of how to specify a view that users only access via Tableau Server (the view is not embedded):

http://tabserver/trusted/<ticket>/views/<workbook>/<view> 

If Tableau Server is running multiple sites and the view is on a site other than the Default site, you need to add t/<site ID> to the path. For example:

http://tabserver/trusted/<ticket>/t/Sales/views/<workbook>/<view> 

Use the same capitalization that you see in the Tableau Server URL.

Embedded View Examples

Here are some examples of how to specify embedded views. Because there are two approaches you can take with embed code, both ways are provided below. Regardless of which you use, there is some information unique to trusted authentication that you must provide. For more information, see Writing Embed Code.

Note: The examples below use embed code parameters. For more information, see Embed Code Parameters in the Tableau Help.

Script Tag Examples

This example uses the ticket object parameter:

<script type="text/javascript" src="http://myserver/javascripts/api/viz_v1.js"></script> 
<object class="tableauViz" width="800" height="600" style="display:none;"> 
    <param name="name" value="MyCoSales/SalesScoreCard" /> 
    <param name="ticket" value="9D1ObyqDQmSIOyQpKdy4Sw==:dg62gCsSE0QRArXNTOp6mlJ5" /> 
</object> 

Here’s what the above example looks like for a multi-site Tableau Server, where the view is published on the Sales site:

<script type="text/javascript" src="http://myserver/javascripts/api/viz_v1.js"></script> 
<object class="tableauViz" width="800" height="600" style="display:none;"> 
    <param name="site_root" value="/t/Sales" /> 
    <param name="name" value="MyCoSales/SalesScoreCard" /> 
    <param name="ticket" value="9D1ObyqDQmSIOyQpKdy4Sw==:dg62gCsSE0QRArXNTOp6mlJ5" /> 
</object> 

Instead of using ticket, you can use the path parameter to state the full path of the view explicitly. When path is used, you do not also need the name parameter, which is usually a required parameter in Tableau JavaScript embed code:

<script type="text/javascript" src="http://myserver/javascripts/api/viz_v1.js"></script> 
<object class="tableauViz" width="900" height="700" style="display:none;"> 
    <param name="path" value="trusted/9D1ObyqDQmSIOyQpKdy4Sw==:dg62gCsSE0QRArXNTOp6mlJ5/views/MyCoSales/SalesScoreCard" /> 
</object> 

Here’s the same example, but for a multi-site server. Note that /t/<site ID> is used here:

<script type="text/javascript" src="http://myserver/javascripts/api/viz_v1.js"></script> 
<object class="tableauViz" width="900" height="700" style="display:none;"> 
     <param name="path" value="trusted/9D1ObyqDQmSIOyQpKdy4Sw==:dg62gCsSE0QRArXNTOp6mlJ5/t/Sales/views/MyCoSales/SalesScoreCard" /> 
</object> 

Iframe Tag Example

<iframe src="http://tabserver/trusted/9D1ObyqDQmSIOyQpKdy4Sw==:dg62gCsSE0QRArXNTOp6mlJ5/views/workbookQ4/SalesQ4?:embed=yes" width="800" height="600"></iframe> 
Thanks for your feedback! There was an error submitting your feedback. Try again or send us a message.