Process instance variable update

This rest api will update variables only for Active process instances or completed process instances also?

POST /process-instance/aProcessInstanceId/variables

Request Body:

{"modifications":
    {"aVariable": {"value": "aValue"},
    "anotherVariable": {"value": 42}},
"deletions": [
    "aThirdVariable", "FourthVariable"
]}

Only active process instances. There is no API to update the process variables of a completed instance.