To delete a specific dial-pattern for a dialing-context:
curl -X DELETE \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://10.0.0.2/rest/v1.2/configuration/configElements?elementType=dialing-context&name=<childKey>&parent=<parentKey>&dial-pattern=<removePrefix>/<pattern>"
To delete a specific dial-pattern for a dialing-context when the pattern only is present:
curl -X DELETE \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://10.0.0.2/rest/v1.2/configuration/configElements?elementType=dialing-context&name=<childKey>&parent=<parentKey>&dial-pattern=/<pattern>"
To delete a specific dial-pattern for a dialing-context when the remove-prefix only is present:
curl -X DELETE \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://10.0.0.2/rest/v1.2/configuration/configElements?elementType=dialing-context&name=<childKey>&parent=<parentKey>&dial-pattern=<removePrefix>/"
To delete all dial patterns for a dialing-context, use removeAll
as the value of the dial-pattern parameter.
curl -X DELETE \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://10.0.0.2/rest/v1.2/configuration/configElements?elementType=dialing-context&name=<childKey>&parent=<parentKey>&dial-pattern=<removeAll>"
To delete a dialing-context:
curl -X DELETE \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://10.0.0.2/rest/v1.2/configuration/configElements?elementType=dialing-context&name=<childKey>&parent=<parentKey>"
If the dialing context you want to delete is at the root level, leave the parent
parameter blank.