Music On Hold¶
Retrieve Music On Hold user configuration¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/music_on_hold/
¶ Get details about Music On Hold service for a user.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/music_on_hold/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "isActive": false, "source": { "messageSourceSelection": "Custom", "audioFile": { "name": "My Music", "mediaType": "WAV" } }, "useAlternateSourceForInternalCalls": true, "internalSource": { "messageSourceSelection": "Group" } }
- Response JSON Object:
isActive (boolean) – Indicate if the service is active for the user or not
source (object) – a source object as defined by Music On Hold Source Attributes
useAlternateSourceForInternalCalls (boolean) – Indicate if the service has to use different source for internal calls
internalSource (object) – a source object as defined by Music On Hold Source Attributes
- Status Codes:
200 OK – no error
Update Music On Hold user configuration¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/music_on_hold/
¶ Update the details about the Music On Hold of the user.
Authorization rights: minimum End User.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/user/foouser/services/music_on_hold/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "isActive": true, "source": { "messageSourceSelection": "Custom", "audioFile": { "name": "My Music" } }, "useAlternateSourceForInternalCalls": true, "internalSource": { "messageSourceSelection": "Group", "audioFile": { "name": "DELETE" } } }
- Request JSON Object:
isActive (boolean) – (Optional) Indicate if the service is active for the user or not
source (object) – (Optional) A media source object as defined by Music On Hold Source Attributes defining the music that will be played for all calls
useAlternateSourceForInternalCalls (boolean) – (Optional) Indicate if the service has to use different source for internal calls
internalSource (object) – (Optional) A media source object as defined by Music On Hold Source Attributes defining the music that will be played for internal calls. It is only used in case useAlternateSourceForInternalCalls is set to True, else the “normal” source will be used for internal calls as well.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "isActive": true, "source": { "messageSourceSelection": "Custom", "audioFile": { "name": "My Music", "mediaType": "WAV" } }, "useAlternateSourceForInternalCalls": true, "internalSource": { "messageSourceSelection": "Group" } }
- Status Codes:
200 OK – no error
400 Bad Request – failed to update
Music On Hold Source Attributes¶
Name |
Type |
Methods |
Description |
|
---|---|---|---|---|
GET |
PUT |
|||
messageSourceSelection |
string |
A |
O |
The source to select. Can be “Custom” or “Group” |
audioFile |
object |
O |
O |
An audio file object as defined as Announcement File Name |