We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Run a job through API error

albert_alaluf
10 - Fireball
10 - Fireball

Hello community,

 

I have an issue not able to figure it out how to fix.

 

My user has a workflow, published to the gallery, and used her credentials when publishing. When she runs, she writes the output to a network folder, it works.

 

She wants to automate the process, so she doesn't want to schedule the workflow on the server. Whatever the other external process was completed, it triggers and calls the workflow through the API. API runs the workflow, but it fails to write output to a network folder.

 

When we compare the workflow results, we found that, in the first scenario, running directly form the gallery, gallery use her credentials. But API scenario, it shows that the workflow ran in the gallery as local user. This shouldn't be the case, because when she published the workflow to the server, she provided her credentials. Even it's used 'Always use that credentials' option, no success.

 

Any suggestion how to fix it?

Albert Alaluf
Alteryx ACE
https://www.linkedin.com/in/alaluf/
13 REPLIES 13
Gaurav_Dhama_
12 - Quasar

CredentialId is an optional field. You can generate the token using a fixed credential using the Oauth2.0 API call. Then use that as input in header as bearer token.

 

Header would be ‘Authorization’: ‘Bearer {your token here}.

 

Token generated will be valid only for an hour or so, hence you need to generate it everytime you run the automation. That is the best practice.

albert_alaluf
10 - Fireball
10 - Fireball

So... if I understood you correctly, my user should make an API call to create the token, then use it on execution to create the job. I will do this by myself. I can create easily with the macros, use that token to create the job within my credentials. Worth to try.

Albert Alaluf
Alteryx ACE
https://www.linkedin.com/in/alaluf/
albert_alaluf
10 - Fireball
10 - Fireball

Nope, this doesn't work. I mean, it runs, but run as LOCAL USER on the server. I need to run as WORKFLOW OWNER.

Albert Alaluf
Alteryx ACE
https://www.linkedin.com/in/alaluf/
SilAlp
5 - Atom

Hello Albert,

I am new to using the API and I was wondering if you could provide a basic example on how to connect. Are you using Python? I have access to the API in the gallery, and the API client and secret are also available for my user. However, I have not been able to use it correctly. My goal is to be able to run a job using the API.

Labels
Top Solution Authors