Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Making POST API calls to a Tableau Server using the Download Tool

wguicheney
5 - Atom

Hello everyone,

 

I'm currently working on a project to automate subscriptions using an Alteryx workflow. The strategy involves downloading (1) a list of relevant users from my organization's SQL database, (2) finding each users Tableau Server ID, (3) checking that list against the people subscribed to a specific view, and (4) subscribing those that aren't subscribed yet, or removing those that have left the organization.

 

I am stuck at the last step, which involves making a POST API call to the server to create new subscriptions. There seems to be very little information from the community about doing this in Alteryx, as there are already very few people doing this in Java or Python. 

 

The POST call involves passing two parameter values api-version and site id, as well as five attributable values, subscription-subject, content-type, content-id, schedule-id, and user-id. I have included all 5 in my call and triple-checked all their values. I have also naturally included an X-Tableau-Authorization token in my headers. Here is what the setup of my download tool looks like.

 

1.PNG 2.PNG 3.PNG 

 

I am getting the following error: a 100 Continue, followed by a 500 Internal Server Error. Not much help there, and as I am a Site Administrator but not a Server admin, I don't have access to the logs to explore further. 

 

4.PNG

 

The online Tableau developer documentation is providing me with lots of different information, such as "For POST and PUT requests, the request should include the Content-Length and Content-Type headers."   but I am not sure this is true, or how a Content-Length header should look like for example. The documentation does not provide many examples of POST requests.

 

Does anybody have any experience making POST API calls to the Tableau Server using Alteryx's Download tool? Any help would be greatly appreciated. 

3 REPLIES 3
LordNeilLord
15 - Aurora

@wguicheney

 

Have you tried embedding the values using the formula tool rather than trying to pass them through the download tool?

 

Something like this....

 

11a2e6d2-e03d-4715-8c30-11f298ff609d.png

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

wguicheney
5 - Atom

Wahou Neil you are really an Alteryx Genius, I don't know where I would be without you! I can't wait to sleep and finally get my life back.

 

Unlimited cookies for you

LordNeilLord
15 - Aurora

Thank you @wguicheney

 

But I couldn't have done it without folks like you asking the really tough questions and challenging my brain.

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

Labels