Complete these tasks to get a list of a dialing-context.
This example assumes you have exported the access token to the variable $TOKEN
.
- List the dialing context.
Use the filter
parameter to list all immediate child contexts of a parent context.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://10.0.0.2/rest/v1.2/configuration/configElements?elementType=dialing-context&filter=<parentKey>"
- Retrieve a specified dialing-context along with its dial-patterns.
curl -X GET \
--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>"
- Retrieve a specific dial-pattern for a dialing-context.
curl -X GET \
--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>"
- Retrieve a specific dial-pattern for a dialing-context when only the pattern is present.
curl -X GET \
--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>"
- Retrieve a specific dial-pattern for a dialing-context when only the remove-prefix is present.
curl -X GET \
--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>/"