Skip to content

Submit a workflow and return outputs with a single API request #12995

Closed Answered by agilgur5
conorsheehan-ow asked this question in Q&A
Discussion options

You must be logged in to vote

I'd like to trigger the workflow and get the response in a single API request.

You can't. Workflows are asynchronous. In general, most k8s resources are. For instance, when you create a Pod, it does not get instantly run, it only gets scheduled to run. Workflows are the same.

Looks like this is possible via the CLI: https://argo-workflows.readthedocs.io/en/latest/cli/argo_wait/

argo wait performs a k8s watch. So an argo submit followed by an argo wait is 2 API requests.

But I can't seem to find a way to do this over the API?

You can add listOptions.watch to a get request to watch a resource via the API.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@conorsheehan-ow
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by agilgur5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/sdks area/api Argo Server API
3 participants