I am pretty new to Alteryx and the API game, and I am working on a solution to migrate workflows from our Dev to Quality server and am running into technical challenges and looking for some help.
I have started with the the following resources from Alteryx community:
Thanks to @jefypop
https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Migrating-Workflows/tac-p/450711#M437
Thanks to @patrick_degan
https://community.alteryx.com/t5/Engine-Works/Using-the-Alteryx-API-from-Alteryx/ba-p/318565
I started working with Patrick's macro and edited his prototype to make a POST call for the end point /gallery/api/admin/v1/workflows/ and provided the parameters in the payload section of the download tool with in the macro, and received HTTP error 411. Below is the error message and some screenshots from the download tool.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>
Solved! Go to Solution.
I have found that @jarrod's Oauth 1.0 Macro is perfect for the job: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/OAuth-1-0-example-needed/m-p/445439/hi...
@maheedharg In my research, the issue was that it needs to be a multi-part form post. And in this post, @RohitChopra and others including myself have been unable to both upload a file and send the other parameters which is necessary for the api endpoint. It would be great if somebody can find a way to do it using the download tool. I assume you already have it, but here is the documentation:
@patrick_digan for file specific uploads I generally use the Python tool for that reason. Sorry I missed that in the original ask! Some APIs you can get creative with blobs, but others are more picky.
Thank you for the feedback Patrick, good to know that I am not the only one with this issue. So to summarize my understanding, I cannot use the download tool to post the workflows. Hopefully Alteryx will consider addressing it in their future developments.
Coming back to the issue, I was trying a couple of ways to test the workflow migration function. One of them was online API-DOCS tool from Alteryx gallery. I tried with below parameters (tried it multiple ways) but ended up with below error.
'file'; filename="E:\Alteryx_Workflow_Test.yxzp"Content-Type; "multipart/form-data"
'name' ; "WF Migration Test"
'owner' ; "maheedhar.g@xxxxx.com"
'validate' ; true
'isPublic' ; false
'sourceId' ; " "
'workerTag' ; "none"
'canDownload' ; false
In parallel, I also used the comprehensive workflow migration tool that @Jefypop published in community here, that does all four tasks. But was unsuccessful with upload step
So, kind of at a standing position before I try to explore the python option.
Thank you Brandon. Yes, I did try the tool you provided and as discussed on the post, ended up with the same error.