Terminate workflows with an API call


Is there an API that I can use to terminate selected or all workflows?

TIA :slight_smile:

1 Like

We do support this:

CLI reference

Here is the API definition for GO SDK


@ryland Thanks for sharing this. I see workflow-id is mentioned as required in your code, just curious to know if there’s a way to terminate all workflows at namespace level.

1 Like

Unfortunately there is not an explicit API for batch termination of workflows in general or at a namespace level. We do support batch termination (not for entire namespace directly) via the CLI, but this is actually just implemented as a workflow which individually terminates the ones you specify. I made sure to note this usage so we can track it and potentially support it in the future.

The batch terminate @ryland mentioned can be used to terminate all the workflows in the namespace.
Note that it requires ElasticSearch integration enabled.

Got you. Thank you both!