0
votes

In the camunda rest api is there a way to delete all the process instance variables in one go.

I thought I read some documentation that said you could do it using...

DELETE http://localhost:8080/contextRoot/rest/engine/default/process-instance/{id}/variables

But when I try that I get a ...

{
  "timestamp": 1479705176075,
  "status": 405,
  "error": "Method Not Allowed",
  "message": "Method Not Allowed",
  "path": "/contextRoot/rest/engine/default/process-instance/14/variables"
}

If I add a variable id I am able to delete one by one but that's not what I'm after.

thanks

1

1 Answers

1
votes

No, not possible in either Java or REST API as of current versions 7.5.0 and 7.6.0-alpha5. The closest you can get is using POST ../variables/modify with a request body such as:

{
  "deletions": 
  [
    "var1", "var2", "var3"
  ]
}

You still have to know the variables to delete, but at least it is a single request.