For automation, we want just the name of the workflow, we can use labels to get just this our suspended workflow:
WF=$(argo list -l workflows.argoproj.io/workflow-template=wait --running -o name)
WF=$(curl $ARGO_SERVER/api/v1/workflows/argo?listOptions.labelSelector=workflows.argoproj.io/workflow-template=wait,\!workflows.argoproj.io/completed \
-fs \
-H "Authorization: $ARGO_TOKEN" |
jq -r '.items[0].metadata.name')
You can resume the workflow via the CLI or API too. If you have more than one node waiting, you must target it using a node field selector.
argo resume $WF --node-field-selector displayName=a
curl $ARGO_SERVER/api/v1/workflows/argo/$WF/resume \
-fs \
-X 'PUT' \
-H "Authorization: $ARGO_TOKEN" \
-d '{"nodeFieldSelector": "displayName=a"}'
Now the workflow will have resumed and completed.
See also: