Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.

Alteryx Server Discussions

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

ServerRipper - Using the Alteryx Gallery API to download workflows en masse

mtornga
6 - Meteoroid

As server admins, we sometimes get in a bind where we have just done a rollback on the server or a cutover and then a user comes out of the woodwork to request a workflow that got lost in the shuffle. We then face restoring the old backup to a lower environment to grab the workflow. This happened to my team recently and it made me want to take a more frequent backup of all of the workflows (we already back up our MongoDB daily), just in case. That is why this utility ServerRipper was created.

 

This utility builds on the excellent work of @patrick_digan about the Alteryx API and @jdunkerley79 on dynamic directory creation using the Run Command tool. 

 

End Result


After running the workflow, a hierarchy of folders is created. Within the top-level folder - I have called mine ServerWorkflowBackup - a folder is created for each Studio/Subscription e.g. Finance, Accounting, Admins. 

 

mtornga_0-1588002385230.png

Within each Subscription folder, a folder is created for each User. 

 

mtornga_1-1588002527521.png

 

Finally, within each user folder is a .yxzp package of every workflow and app that the user owns on the gallery.

 

mtornga_2-1588002658737.png


Install and Run

Download and open the file ServerRipper_community.yxzp attached. This was developed in Designer 2020.1. 

 

When prompted to import packages, say yes. Ignore errors and warnings on the Import Workflow Package and Workflow Dependencies popups. 

 

Close Designer and go back to your download location. At this location '\ServerRipper_community\yxi installer' find and install 'Alteryx API Runner.yxi'. Reopen the workflow.

Follow the rest of the instructions in the workflow.

mtornga_3-1588004094169.png

If you find that you have errors, ensure that the Cleanse tool is set up correctly, and ensure that you are a Curator in your Gallery. 

I hope that you find this simple to use and that it saves you from a headache someday. Enjoy!

 

16 REPLIES 16
lcrosby
7 - Meteor

Yeah I've just implemented a workflow that grabs all the workflows/apps on our gallery, downloads them to the temp folder as packages and then opens the package file to pull the XML from the workflow file. We can then audit what tools/macros are being implemented and where so if we make a change to a macro we can easily identify where it's used to check if an update causes any trouble. Saves a lot of time, hopefully.

BENOIT_RAFFIN
7 - Meteor

Hi Alteryx Community,

 

ServerRipper_Community Workflow does not work anymore with our new Alteryx Server (version 2021.3.2.54175).

 

List of all workflows through API works (first part of the workflow) but the second part (download data and save yxzp) does not work anymore.

No data. 

 

Any help would be appreciated. Best regards,

 

chvizda
8 - Asteroid

Really cool. I can now sleep much better.

pringleb
7 - Meteor

Stupid question... what should the endpoint URL be?  Is it just the https://alteryx.domain.com or https://alteryx.domain.com/gallery or something else?  I keep getting 404 errors with either of those (with the correct domain).  

 

Yes, my gallery is still on 2020.1. 

hroderick-thr
11 - Bolide
hroderick-thr
11 - Bolide

Better late than never

We use command line 7zip to make it easier to read long full paths are in red, command code is bold black, comments are blue

 

rem delete unzip destination directory if it already exists

IF EXIST "\\myserver\d\THR\AlteryxApps\AlteryxJobPromotion\Lockers\20220805095211 mynetworkid\Pharmacy Antimicrobial Dashboard Alteryx Process" RMDIR /S /Q "\\myserver\d\THR\AlteryxApps\AlteryxJobPromotion\Lockers\20220805095211 mynetworkid\Pharmacy Antimicrobial Dashboard Alteryx Process"

 

rem unpack yxzp which come with yxmd file type
"\\myserver\d\Program Files\7-Zip\7z.exe" x "\\myserver\d\THR\AlteryxApps\AlteryxJobPromotion\Lockers\20220805095211 mynetworkid\Pharmacy Antimicrobial Dashboard Alteryx Process.yxmd" -o"\\myserver\d\THR\AlteryxApps\AlteryxJobPromotion\Lockers\20220805095211 mynetworkid\Pharmacy Antimicrobial Dashboard Alteryx Process" -Y -aoa


rem always return code zero
TIMEOUT /T 0

pringleb
7 - Meteor

Thank you for the quick reply.  I tried that and get an "Unauthorized" if I try with "http" and get a "307 Temporary Redirect" if I try with "https"  .  Our company enforces SSL on the servers.  Does this not work with SSL?