Pre Alerting Announcement¶
Display user’s pre alerting alerting announcement¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/pre_announcement/
¶ Retrieve the settings of the Pre Alerting Announcement service of the user; i.e. the announcement that will be played to the calling party before the called party will start ringing.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "active": false, "audioSelection": "File", "audioFile": { "name": "APIO User Test Announcement" }, "criteria": [ { "name": "test", "active": true, "callsFrom": "All calls", "doNotPerformAction": false, "fromDnCriteria": { "includeAnonymousCallers": false, "selection": "Any", "phoneNumbers": [], "includeUnavailableCallers": false } } ] }
- Response JSON Object:
active (boolean) – the status of the service.
audioSelection (string) – the the selection of the file to be played.
audioFile (object) – an objects as defined as Audio File attributes.
criteria (array) – a list of criteria objects as defined as Criteria in List attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
Update a user’s pre alerting announcement¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/pre_announcement/
¶ Update the settings of the Pre Alerting Announcement service of the user.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "active": true, "audioSelection": "Default", "criteria": [ { "name": "test", "active": true }, { "name": "test2", "active": false, "callsFrom": "All calls", "doNotPerformAction": false, "fromDnCriteria": { "includeAnonymousCallers": false, "selection": "Any", "phoneNumbers": [], "includeUnavailableCallers": false } }, { "name": "test3", "delete": true } ] }
Example response:
HTTP/1.1 200 OK
- Request JSON Object:
active (boolean) – the status of the service.
audioSelection (string) – the the selection of the file to be played.
audioFile (object) – an objects as defined as Audio File attributes. Or None to remove the currently configured audioFile.
criteria (array) – a list of criteria objects as defined as Criteria attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the update
Display user’s pre alerting announcement criteria¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/pre_announcement/criteria/
(string: instance_name)/
¶ Retrieve the settings of the specified Pre Alerting Announcement’s criteria.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/criteria/foocriteria/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "name": "test", "active": true, "timeSchedule": { "level": "User", "name": "Every Friday", "type": "Time" }, "holidaySchedule": { "level": "User", "name": "Every Easter", "type": "Holiday" }, "fromDnCriteria": { "selection": "Any", "includeAnonymousCallers": false, "includeUnavailableCallers": true, "phoneNumbers": [ "+3225126777" ] }, "doNotPerformAction": false }
- Response JSON Object:
name (string) – see name from Criteria attributes.
active (boolean) – see active from Criteria attributes.
timeSchedule (object) – see timeSchedule from Criteria attributes.
holidaySchedule (object) – see holidaySchedule from Criteria attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
Create a user’s pre alerting announcement criteria¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/pre_announcement/criteria/
¶ Create a new Pre Alerting Announcement’s criteria.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/criteria/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "name": "test", "active": true, "timeSchedule": { "level": "User", "name": "Every Friday", "type": "Time" }, "holidaySchedule": { "level": "User", "name": "Every Easter", "type": "Holiday" }, "fromDnCriteria": { "selection": "Any" "includeAnonymousCallers": false, "includeUnavailableCallers": true, "phoneNumbers": [ "+3225126777" ] } }
- Request JSON Object:
name (string) – see name from Criteria attributes (required).
active (boolean) – see active from Criteria attributes.
timeSchedule (object) – see timeSchedule from Criteria attributes.
holidaySchedule (object) – see holidaySchedule from Criteria attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes.
Example response:
HTTP/1.1 200 OK
- Response JSON Object:
name (string) – see name from Criteria attributes.
active (boolean) – see active from Criteria attributes.
timeSchedule (object) – see timeSchedule from :Criteria attributes.
holidaySchedule (object) – see holidaySchedule from Criteria attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the update
Update a user’s pre alerting announcement criteria¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/pre_announcement/criteria/
(string: instance_name)/
¶ Update the settings of the Pre Alerting Announcement service of the user.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/criteria/foocriteria/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "name": "test", "newName": "test_new", "active": true, "timeSchedule": { "level": "User", "name": "Every Friday", "type": "Time" }, "holidaySchedule": { "level": "User", "name": "Every Easter", "type": "Holiday" }, "fromDnCriteria": { "selection": "Any" "includeAnonymousCallers": false, "includeUnavailableCallers": true, "phoneNumbers": [ "+3225126777" ] } }
- Request JSON Object:
name (string) – see name from Criteria attributes.
newName (string) – see name from Criteria attributes.
active (boolean) – see active from Criteria attributes.
timeSchedule (object) – see timeSchedule from :Criteria attributes.
holidaySchedule (object) – see holidaySchedule from Criteria attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes.
Example response:
HTTP/1.1 200 OK
- Response JSON Object:
name (string) – see name from Criteria attributes.
active (boolean) – see active from Criteria attributes.
timeSchedule (object) – see timeSchedule from Criteria attributes.
holidaySchedule (object) – see holidaySchedule from Criteria attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the update
Delete a user’s pre alerting announcement criteria¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/pre_announcement/criteria/
(string: instance_name)/
¶ Delete the specified Pre Alerting Announcement’s criteria.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/criteria/foocriteria/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "name": "test" }
Example response:
HTTP/1.1 200 OK
- Response JSON Object:
name (string) – see name from Criteria attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the deletion