Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

POST API to Publish Workflow to Gallery - HTTP Error 411

maheedharg
5 - Atom

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>

 

maheedharg_0-1627510164778.png             maheedharg_1-1627510202692.png

 

 

 

5 REPLIES 5
BrandonB
Alteryx
Alteryx

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... 

 

BrandonB_0-1627531923347.png

 

BrandonB_1-1627531959837.png

 

BrandonB_2-1627531976835.png

 

 

 

 

 

patrick_digan
17 - Castor
17 - Castor

@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_0-1627559624566.png

 

BrandonB
Alteryx
Alteryx

@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. 

maheedharg
5 - Atom

 

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

 

maheedharg_0-1627604074929.png

 

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

  • Identify the migratable workflows – worked
  • Download the workflow – worked
  • Upload workflow into Gallery – Failed with below error (log attached)
  • Reset “Ready for Migration flag” - worked

So, kind of at a standing position before I try to explore the python option.

maheedharg
5 - Atom

Thank you Brandon. Yes, I did try the tool you provided and as discussed on the post, ended up with the same error. 

Labels