Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

API call to get Workflow Dependencies for all workflows on the Gallery

BonusCup
11 - Bolide

Hi, is there an API call or any other way to get a list of all server inputs used across all Workflows that are saved on the Gallery? The information provided in the Workflow Dependencies under Options > Advanced Options would be very useful for me and my team.  We will be needing to change all the inputs that are currently pointed to a specific server in the near future so I'm just trying to get ahead of it.

 

Thanks

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @BonusCup ,

 

Unfortunately, this endpoint doesn`t exist. It would be really cool if there was something like that!

 

Currently, you must create a process to download all workflows from the Gallery, unzip them, read the workflow as CSV (workflows are XML files) and extract anything related to input and output from the document.

 

There is a sample workflow that you can adapt for the last part.

Read workflow XML.png

 

Best,

Fernando Vizcaino

craigja
9 - Comet

I have a similar ask - Ive extracted the workflows an built a little macro to read them all in as csv (txt) files. I can put a filter on and look for a specific connection string which is working well but what I really want to get at is the Select statement the user used when connection to a specific database.  I think the only way to get the full select statement would be to use something like the XML parse tool, but I dont think that would work, as I dont know what tools use the specific connection string, and cant see a way to get at that when reading in as a txt file.

fmvizcaino
17 - Castor
17 - Castor

Hi @craigja ,

 

The XML parse won`t capture everything you need at once. You can probably serialize the XML parse tools to identify everything you need, but it won`t be easy.

I`d say the best route is to use Regex. You will have to capture the Input and Output tools.

 

The highlighted areas are your guides to use in regex.

Screenshot 2024-12-19 114902.png

 

I pasted the workflow XML and built an example with Regex for you. You might be able to do something simpler by only searching for the string <Query> but I`m not sure other tools don`t have the same.

https://regex101.com/r/uRhHGO/1

 

Best,

Fernando Vizcaino

BonusCup
11 - Bolide

@craigja would it be possible to share your macro and how you extracted your workflows?  This would be a great time saver.  I'll also be looking into pulling the full select statement.

 

Thanks