BoatyMcBoatFace
BoatyMcBoatFace7mo ago

How to access returned values in an external script.

I know this is probably very basic but I'm a newbie and I spent hours trying to get it to work yesterday. I have created a very simple workflow which I want to call from an external python script, and have that same python script process the response. All works fine... the python script shows a 201 response and print (response.text) shows the job_id. But I cannot work out how to access, in the calling python script, the json returned by the Windmill workflow. Can anyone help please?
No description
No description
3 Replies
rubenf
rubenf7mo ago
Hi @BoatyMcBoatFace , you should return instead of just priting your result then for async jobs, call the get result api, or for sync jobs that is what will be returned
Hugo C.
Hugo C.7mo ago
Here's the api docs for running a flow and waiting for its result (sync): https://app.windmill.dev/openapi.html#tag/job/post/w/{workspace}/jobs/run_wait_result/f/{path}
BoatyMcBoatFace
BoatyMcBoatFace7mo ago
Great, thanks very much for your help @rubenf & @Hugo . I really appreciate it.👍