Alteryx Designer Desktop Discussions

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

How to download .yxmd files using Server API tool

YusukeTakahashi
7 - Meteor

Hello.

 

I am looking to download a workflow on AlteryxServer via API.

I used a tool called Server API tool (https://help.alteryx.com/20231/designer/server-api-tool) to access the following endpoints via API.

 

/v1/workflows/{appId}/package
/v3/workflows/{workflowId}/package

 

As for v1, the response was returned, but the download does not seem to have been completed.
As for v3, 400 BadRequest is returned.

 

I am looking for a way to download on Designer.
I would appreciate if someone could give me some advice.

 

Thank you very much.

4 REPLIES 4
SPetrie
12 - Quasar

I use a different software to download my backups, but I do use the API to do it. I use admin/v1/{'id'}/package as the endpoint.

Does using that endpoint yield different results for you?

YusukeTakahashi
7 - Meteor

@SPetrie 

Thank you for your reply.

I tried the admin/v1/{'id'}/package endpoint.
I am getting a response to my request, but I am unable to download the file.
I would like to know how I can download the file on AlteryxDesigner.

(Image is part of the results window on Degisner)

I would appreciate if someone could give me some advice.

I would like to know if there is any other means other than this tool to download files using the API.

SPetrie
12 - Quasar

I tested this in designer and think I see what your issue may be.

In the download tool, you most likely have output set to be "To a Field" as a String

This is what I see when I tested with that setup and it seems to match what you are getting.

In my testing, I used the V3 server macros to do the Oath2 authorization and then just the standard download tool to do the actual download request.

 

SPetrie_0-1685028784433.png

SPetrie_1-1685028832475.png

What you want to do is either save "To a File" and pass it a field with "yourefilename.yxzp" in it, or your can use the Blob field and then a Blob output tool to save the file, again using a field to specify the name.

 

This is how I had the blob version configured

SPetrie_2-1685029213299.png

SPetrie_3-1685029232526.png

SPetrie_4-1685029280518.png

 

And the "To File" version

SPetrie_5-1685029344935.png

SPetrie_6-1685029435907.png

SPetrie_7-1685029452631.png

 

 

 

 

Either of those options should work to get your packages downloaded.

I attached an example workflow I used and was able to download one of my apps with.

 

 

 

 

 

YusukeTakahashi
7 - Meteor

@SPetrie 

We are very grateful for your prompt and detailed response.

First of all, I would like to thank you for the successful download as a result.

As per your advice, I decided to use a different macro. (https://community.alteryx.com/t5/Engine-Works/Introducing-the-Alteryx-Server-v3-API/ba-p/899228)

By using the above macro, I was able to execute the download successfully.

Thank you very much!

Labels