I'm trying to delete some outdated IVR's using the GC CLI. When attempting to delete an IVR with an Emergency Group set, I get an error:
"message": "The resource 57c1cdcc-a273-4641-9765-7ea51234e3ca0 is referenced by the emergencyGroup c72fee61-9232-48f5-22f6-cxb80cf1bdp6.",
"code": "general.conflict",
"status": 409,
Despite the fact that within the UI, this is set on the IVR config, that's not the case via API. So I concluded that I need to modify the emergencyGroup in question and remove the ivr from the array.
The request body would look like this (assume when retriving the emergencyGroup data, ivrs array has 3 items and I've removed one. Also assume the ID's are correct
{
"emergencyCallFlows": [
{
"ivrs": [
{
"id": "8ef50190-23c7-455c-8309-f5213ec66ca5",
"selfUri": "/api/v2/architect/schedulegroups/8ef50190-23c7-455c-8309-f5213ec66ca3",
"name": "Call Route 1"
},
{
"id": "8ef50191-23c7-455c-8309-f5213ec66ca5",
"selfUri": "/api/v2/architect/schedulegroups/8ef50191-23c7-455c-8309-f5213ec66ca5",
"name": "Call Route 2"
}
],
"emergencyFlow": {
"id": "5ef50190-23c7-455c-8309-f5213ec66ca4",
"name": "ER Flow",
"selfUri": "/api/v2/architect/schedulegroups/5ef5010-23c7-455c-8309-f5213ec66ca4"
}
},
null
],
"name": "EU Emergency",
"division": {
"id": "divisonIdHere",
"name": "MyDivision"
},
"description": "Hello World",
"version": 2,
"enabled": false
}
Unfortunately, I always get this response:
"message": "The request could not be understood by the server due to malformed syntax.",
"code": "bad.request",
"status": 400
Before I waste any more time with this, is removing an IVR from the emergencyGroup even supported?