Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Server Discussions

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

How to pass a filename to an input tool from API

ImenMersani
7 - Meteor

Hello community,

I'm actually working with the API on alteryx server so i created an application that takes a filename as a parameter and launches a process into a macro (look at the screenshot below):

ImenMersani_0-1675781093964.png

 

This processing consists of creating a table in a database so i added a control parameter inside the macro with this configuration :

ImenMersani_0-1675782504186.png


I published this version on the server and I tried to pass a file name as parameter :

 

ImenMersani_2-1675781402176.png

 

and it showed me this error message knowing that I have access to this directory and when I run it without API it works fine.

ImenMersani_0-1675783028913.png

 

 

Please let me know how to do it.

Thank you.

 

5 REPLIES 5
gabrielvilella
14 - Magnetar

What is the account that you use when you run it manually? It seems that the default run as account does not have access to that folder.

ImenMersani
7 - Meteor

The same account 

LanceFace
7 - Meteor

We have run into the same issue. Using a text box to update a directory tool. The flow works on Designer, through the Server UI, but for some reason when queued by the API it fails and is not able to access the folder. We generally run all of our flows from Alteryx as admin so that folder access is not restricted. Does anyone know if the API has a separate flag to run as admin? The workflow is set to always run as admin on default.

SPetrie
12 - Quasar

If you have an admin credential created in gallery, there is a credentialID you can use to run the workflow using that credential.

I use it on a V2 endpoint to run flows as admin so I dont run into any permission issues, not sure if it works on V1 but its worth a shot.

SPetrie_0-1676409122935.png

 

ImenMersani
7 - Meteor

Hello, 

 

I just made it work by changing the annotation in the text box and switching to the swagger V2.

 

Thank you.