We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Server Discussions

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

Publishing a workflow to a private studio using API

8 - Asteroid

I'm working to build a process that will hopefully use only Alteryx (no python, C#, or outside binary) to migrate workflows from one internal gallery to another.


I have been able to get my process to a point where I can log in, download the workflow, prepare the new URL, Content headers, and Payload, but upon attempting to POST the workflow back to the server, I get the error - 501 -- Format Exception.


my guess is this has to do with attempting to convert a yxzp file to a blob/hex to place in the payload.


my process is opening the yxzp as a blob, then converting to a hex encoded Binary.


I have seen the Python process that worked, but with a yxzp, it is able to include it as a "file" data type... is there an equivalent that we can use within Alt?

Alteryx Alumni (Retired)


I created 3 different connectors that cover the endpoints.


Part 1 – Get Migratable workflow IDs


HTTP Request Method – GET
Endpoint – api/admin/v1/workflows/migratable/?subscriptionIds={comma separated subscriptionIds}/
The first endpoint exposes an array of ApplicationIds which have been marked as ready to migrate. This endpoint takes a comma separated list of subscriptionIds as a query parameter and will return all workflows marked as ready to migrate under the specific studio(s). 
If no subscriptionsIds are provided, then all workflows that have been marked as ready to migrate should be returned. This is a lightweight endpoint that will return just three properties. The appId, the currently published revision ID, as well as the subscriptionID the workflow belongs to.



Part 2 – Download Migratable workflows


HTTP Request Method – GET
Endpoint – api/admin/v1/{appID}/package/
The second endpoint will download the actual workflow as a .YXZP. This endpoint takes an appID as a parameter and downloads the entire workflow as a package in the destination folder. 



Part 3 – Upload workflows to new Alteryx server instance


HTTP Request Method – HTTP POST
Endpoint – api/admin/v1/workflows/
The third endpoint is a publish endpoint. This allows you to take the workflow obtained in the second endpoint and publish to the target environment. This post uses a multipart form-data request. 

Part 3 is what you would be interested in. I would recommend taking a look at this KB article to get a complete picture.



8 - Asteroid

thank you!  I was working through the same method for the Publish process (using the Python tool) and was running into some issues because the code I had working was in 2.7.  using your code to fill out mine got me through the issues.



11 - Bolide


If I run the api to download the yxzp, is it stored in MongoDb?








The yxzp will be pulled from MongoDB of the environment the workflow is being migrated from and stored locally (wherever you run the workflow) in order for it to be pushed into MongoDB of the environment you're migrating to.



11 - Bolide

Thanks, @MichalM