I almost forgot the delete part.
If you just want to delete all workflow instances, you can import this into a nodered instance.
[
{
"id": "b85abd5a81311fd1",
"type": "inject",
"z": "9e73f64b7c3502dd",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 540,
"y": 40,
"wires": [
[
"e89f87b343a7f915"
]
]
},
{
"id": "e89f87b343a7f915",
"type": "api delete many",
"z": "9e73f64b7c3502dd",
"name": "",
"query": "{\"_type\": \"workflowinstance\"}",
"querytype": "str",
"collection": "openrpa_instances",
"collectiontype": "str",
"x": 710,
"y": 40,
"wires": [
[]
]
}
]