Custom Ring Back¶
Display user’s custom ring back¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/custom_ringback/
¶ Retrieve the settings of the Custom Ring Back service of the user.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "criteria": [ { "name": "test", "active": true, "callsFrom": "All calls", "doNotPerformAction": false, "fromDnCriteria": { "includeAnonymousCallers": false, "selection": "Any", "phoneNumbers": [], "includeUnavailableCallers": false } } ] }
- Response JSON Object:
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 custom ring back¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/custom_ringback/
¶ Update the settings of the Custom Ring Back service of the user.
This API allows to manage several criteria at a time including creating, deleting, updating.
However it is recommanded (from REST point of view) to used the dedicated individual end points described later in this page.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "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:
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 custom ring back criteria¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/custom_ringback/criteria/
(string: instance_name)/
¶ Retrieve the settings of the specified Custom Ring Back’s criteria.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/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 for Custom Ring Back.
active (boolean) – see active from Criteria attributes for Custom Ring Back.
private (boolean) – see private from Criteria attributes for Custom Ring Back.
timeSchedule (object) – see timeSchedule from Schedule attributes.
holidaySchedule (object) – see holidaySchedule from Schedule attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes for Custom Ring Back.
audioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
audioFile (object) – see audioFile from Criteria attributes for Custom Ring Back.
callWaitingAudioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
callWaitingAudioFile (object) – see callWaitingAudioFile from Criteria attributes for Custom Ring Back.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
Create a user’s custom ring back criteria¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/custom_ringback/criteria/
¶ Update the settings of the Custom Ring Back’s criteria.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/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" ] }, "audioSelection": "File", "audioFile": { "name": "APIO User Test Announcement" }, "callWaitingAudioSelection": "File", "callWaitingAudioFile": { "name": "Call Waiting Announcement" }, }
- Request JSON Object:
name (string) – see name from Criteria attributes for Custom Ring Back (required).
active (boolean) – see active from Criteria attributes for Custom Ring Back.
timeSchedule (object) – see timeSchedule from Schedule attributes.
holidaySchedule (object) – see holidaySchedule from Schedule attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes for Custom Ring Back.
audioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
audioFile (object) – see audioFile from Criteria attributes for Custom Ring Back.
callWaitingAudioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
callWaitingAudioFile (object) – see callWaitingAudioFile from Criteria attributes for Custom Ring Back.
Example response:
HTTP/1.1 200 OK
- Response JSON Object:
name (string) – see name from Criteria attributes for Custom Ring Back.
active (boolean) – see active from Criteria attributes for Custom Ring Back.
private (boolean) – see private from Criteria attributes for Custom Ring Back.
timeSchedule (object) – see timeSchedule from Schedule attributes.
holidaySchedule (object) – see holidaySchedule from Schedule attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes for Custom Ring Back.
audioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
audioFile (object) – see audioFile from Criteria attributes for Custom Ring Back.
callWaitingAudioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
callWaitingAudioFile (object) – see callWaitingAudioFile from Criteria attributes for Custom Ring Back.
- 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 custom ring back criteria¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/custom_ringback/criteria/
(string: instance_name)/
¶ Update the settings of the Custom Ring Back service of the user.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/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 for Custom Ring Back.
newName (string) – see name from Criteria attributes for Custom Ring Back.
active (boolean) – see active from Criteria attributes for Custom Ring Back.
timeSchedule (object) – see timeSchedule from Schedule attributes.
holidaySchedule (object) – see holidaySchedule from Schedule attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
audioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
audioFile (object) – see audioFile from Criteria attributes for Custom Ring Back.
callWaitingAudioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
callWaitingAudioFile (object) – see callWaitingAudioFile from Criteria attributes for Custom Ring Back.
Example response:
HTTP/1.1 200 OK
- Response JSON Object:
name (string) – see name from Criteria attributes for Custom Ring Back.
active (boolean) – see active from Criteria attributes for Custom Ring Back.
private (boolean) – see private from Criteria attributes for Custom Ring Back.
timeSchedule (object) – see timeSchedule from Schedule attributes.
holidaySchedule (object) – see holidaySchedule from Schedule attributes.
fromDnCriteria (object) – a criteria from DN object as defined as Criteria From DN attributes.
doNotPerformAction (boolean) – see doNotPerformAction from Criteria attributes for Custom Ring Back.
audioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
audioFile (object) – see audioFile from Criteria attributes for Custom Ring Back.
callWaitingAudioSelection (string) – see audioSelection from Criteria attributes for Custom Ring Back.
callWaitingAudioFile (object) – see callWaitingAudioFile from Criteria attributes for Custom Ring Back.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the update
Disassign a user’s custom ring back criteria¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/custom_ringback/criteria/
(string: instance_name)/
¶ Disassign the settings of the specified Custom Ring Back’s criteria.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/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 for Custom Ring Back.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the deletion