Historic process instance does not exist. Getting this response while deleting through REST (using curl)

I am using Camunda 7.11 and trying to delete the historic process instances via REST.
curl -b cookies.txt -H “$TOKEN” -v -X DELETE ‘http://:8080/weaver/api/engine/engine//history/process-instance/’“$histprocessInstanceId”

But getting the below response,
{“type”:“InvalidRequestException”,“message”:“Historic process instance with id 26c94daf-8071-11ed-ac05-7a4be5ca6300 does not exist”}

But I am getting the correct response for the following REST requests, which means historic process instances are still exists.

histProcessInstanceCount=$(curl -b cookies.txt -v -X GET http:///weaver/api/engine/engine//history/process-instance/count?processDefinitionKey=xxxx python -c “import sys, json; print json.load(sys.stdin)[‘count’]”)
echo “HISTORY INSTANCE COUNT>>” “$histProcessInstanceCount”

HISTORY INSTANCE COUNT>> 8

histprocessInstanceId=$(curl -v -b cookies.txt -c cookies.txt -X GET http://:8080/weaver/api/engine/engine//history/process-instance?processDefinitionKey=xxxx| python -c “import sys, json; print json.load(sys.stdin)[0][‘id’]”)
echo “processInstanceId: “$i”>>”$histprocessInstanceId

processInstanceId: >>26c94daf-8071-11ed-ac05-7a4be5ca6300

So any idea, why this happens and any other alternate solution to delete historic details via REST using curl.