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?
3 Replies
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
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}
Great, thanks very much for your help @rubenf & @Hugo . I really appreciate it.👍