Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3655

Accessing Tableau view via a Google apps script

$
0
0

I am trying to connect to Tableau from a Google Apps Script so that I can get the view data and populate a Google Sheet. Not finding any good examples online however.

I am using this code to connect via a Personal Access Token but I do not know how to parse the auth token which is returned in XML (despite me setting the content type as JSON) and then how to make a second call to query the server?

function tableauAPI() {const options = { method: 'post', muteHttpExceptions: true, contentType: 'application/json', accept: 'application/json', payload: JSON.stringify(   {     credentials: {       personalAccessTokenName: 'TestToken',       personalAccessTokenSecret: '11122223333444455555',       site: {         contentUrl: '',       },     },   } ),};const response = UrlFetchApp.fetch('https://example.tableau.com/api/3.21/auth/signin', options);console.log(response.getContentText());}

Viewing all articles
Browse latest Browse all 3655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>