Alteryx Server API: Can we read data generated by Alteryx workflow via Server API?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Community,
I am calling Alteryx API to run the workflow through Power Automate Desktop.
I want to check if it is possible to get the data which is generated by my Alteryx Workflow through Alteryx Server API's?
Instead of saving the file with the output data, I want to pass data in JSON Format.
Solved! Go to Solution.
- Labels:
- API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Unfortunately, I donot think there is an endpoint for this.
I think the easiest way would be to use a python tool or a json build tool at the end and store the result to a txt file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Arti2893 ,
You will have to use a set of endpoints to achieve this result, but it is possible.
Access Swagger. There you have access to all the endpoints available. You can find it on the question mark icon on your Gallery. https://help.alteryx.com/20231/en/server/api-overview.html#api-overview-6422959
You have to access the V1 endpoints on Swagger and you will see this list.
1. Run the workflow and return a jobID
2. Check if the workflow was successfully run and return the OutputID if any
3. Return the file
Best,
Fernando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @fmvizcaino ,
Thank you for your response. The above API will return the file, instead of file can we get output data in JSON format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes, you have a json output. The response body shows a json file to be downloaded, but you will get the raw json data as a response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @fmvizcaino . I tried this in postman and I am getting json as response, exactly what I needed!
Thanks for your quick response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @fmvizcaino ,
Thanks a lot for the 3 steps you described. I have implemented a workflow that is performing the 3 steps sequentially and it works...
Except when it fails half of the time because the 2nd step starts before the workflow on the server has finished to run :-)
Would you have a way to make sure to run the 2nd step only when the workflow has finished to run on the server? Should I make some kind of iterative macro that perform the 2nd step until it gets the status "Completed"? Or do you know of an easier way?
A quick hack I did is using a Throttle tool to wait some time before launching the 2nd step, but I want to create a generic tool that launches a workflow on the server and get the output back.
Thanks again for your help.
François
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @francoiscortezon ,
Your assumption is correct; you have to create an iterative macro to check the job status until it is completed.
Best,
Fernando V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @fmvizcaino .
I am now giving a try at this macro (Python inside): Use the Alteryx Server API to Run Apps/Workflows F... - Alteryx Community.
It seems it has the advantage to tackle the next part of my need: passing input data to the workflow via API.
If I can't make it work, then I will go for the Iterative Macro approach.
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @francoiscortezon ,
Use this tool here: https://help.alteryx.com/current/en/designer/tools/developer/server-api-tool.html
This one was created by Alteryx.
Best,
Fernando
