Alteryx Server Discussions

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

Script to publish workflow

KingKay
5 - Atom

Please, does anyone has a script to publish workflow to the gallery. My team is creating CI/CD pipeline in order to publish workflow to the gallery. Although the pipeline has been successfully established in GitHub, Team City and Octopus, need a script to push the workflow in Octopus, either PowerShell, Pytho3 or any script. Any help will be greatly appreciated. Thanks!

3 REPLIES 3
gabrielvilella
14 - Magnetar

You can find some articles about how to use Python to call Server APIs. A quick Google gave me this:

https://community.alteryx.com/t5/Alteryx-Server-Discussions/Alteryx-Gallery-API-call-from-Python/td-... 

https://github.com/Theamazingdp/AlteryxGalleryAPI 

 

Maybe you can find something for the other technologies you mentioned. 

KingKay
5 - Atom

Thanks for the info gabrielvilella.

KingKay
5 - Atom

Hi DiganP,

Can your below script be used to publish a workflow to the Gallery? The workflow is located in folder X on Drive C. Or is there any modification that needs to be done. Need a script either Python or PowerShell. thanks for the help.

 

import subprocess
filename = "C:\\Users\\dparikh\\Downloads\\Join Workflow final.yxmd"
subprocess.run(["C:\\Program Files\\Alteryx\\bin\\AlteryxEngineCmd.exe ",  filename])