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

Setting priority for jobs using gallery api

skuppayy
5 - Atom

Hi,
We have python code which is used to Trigger and Execute Alteryx workflow. Our python code uses request.post(url, params) to trigger the workflow  where the url is gallery_url along with job id and params has the oath parameters. The code has been working fine but lately our jobs are getting queued for a long time. So we decided to increase the priority of the job. But currently i am not sure how to set the priority. In the params section i believe this can be used for Oath parameters and not for sending priorities . Is there a way to send priority in the request.post when triggering the workflow? If not, can we only do this using Alteryx Server UI?

 

Thanks

Sk

 

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

Hey @skuppayy ,

 

 

When sending a post request to run jobs in Alteryx, you have the option to send information for analytical apps and job priority.

Maybe the python function you are using is not sending anything in the body and you need to include this part as well.

 

https://gallery.alteryx.com/api-docs/#!/workflows.json/EnqueuePOST

 

fmvizcaino_0-1633637558174.png

 

Best,

Fernando Vizcaino

 

 

skuppayy
5 - Atom

Thank you @fmvizcaino for quick response.

I am quite new to using API's and Python request module. I have couple of dumb questions .

1. I see couple of options to send payload in request.json ie Data and Json. While sending priority value do we use data option or json option in request.post .

2. In the below link  i see there are few keys called questions along with priority. Do we have to send questions too or can we send only Priority. What does questions here refer to?

3. I wanted to test the api's using our client parameters. Our current python uses request.post to trigger the workflow which is in prod environment.  Does using request.post using our parameters in the below link trigger the work flow similar to our python code . I wouldn't want to trigger the workflow while testing. 

 

 

fmvizcaino
17 - Castor
17 - Castor

Hey @skuppayy ,

 

1. You need to send as a json and define the header 'content-type' as 'application/json'

2. It is possible to only send the priority and you need to send numbers:

  • 0 = Normal/Low
  • 1 = Medium
  • 2 = High
  • 3 = Critical
  • 4 = Chained Apps
  • 6 = Validation

Questions are related to analytical apps. If you are using interface tools in your app, you can send data and modify anything in your workflow based on those.

 

3. No, but you will not be able to test using this documentation. The one I sent you is from the Alteryx public gallery, your client's environment has its own interactive app requests and you can test from there, but it will trigger the same way as your python code is. I suggest you creating a dummy analytical app to test that out.

 

 

Best,

Fernando Vizcaino