Music On Hold

Retrieve group configuration

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/music_on_hold/

Get the details about the Music On Hold of the group.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/services/music_on_hold/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
     "serviceUserId": "test_user_id",
     "useAlternateSourceForInternalCalls": false,
     "isActiveDuringCallPark": true,
     "isActiveDuringBusyCampOn": false,
     "isActiveDuringCallHold": true,
     "source": {
          "audioFilePreferredCodec": "G711",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     },
     "internalSource": null
}
Response JSON Object:
  • serviceUserId (string) – Uniquely identifies a service provider.

  • useAlternateSourceForInternalCalls (boolean) – Indicate if the service has to use different source for internal calls

  • isActiveDuringCallPark (boolean) – Indicate if the service is active during call park

  • isActiveDuringBusyCampOn (boolean) – Indicate if the service is active during busy camp on

  • isActiveDuringCallHold (boolean) – Indicate if the service is active during call hold

  • source (object) – a source object as defined as Music On Hold Source Attributes

  • internalSource (object) – a source object as defined as Music On Hold Source Attributes

Status Codes:

Update group configuration

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/music_on_hold/

Update the details about the Music On Hold of the group.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/services/music_on_hold/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
     "useAlternateSourceForInternalCalls": true,
     "isActiveDuringCallPark": false,
     "internalSource": {
          "audioFilePreferredCodec": "G722",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     }
}
Request JSON Object:
  • useAlternateSourceForInternalCalls (boolean) – Indicate if the service has to use different source for internal calls

  • isActiveDuringCallPark (boolean) – Indicate if the service is active during call park

  • isActiveDuringBusyCampOn (boolean) – Indicate if the service is active during busy camp on

  • isActiveDuringCallHold (boolean) – Indicate if the service is active during call hold

  • source (object) – a media source object as defined as Music On Hold Source Attributes defining the music that will be played for all calls.

  • internalSource (object) – an media source object as defined as 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"

{
     "serviceUserId": "test_user_id",
     "useAlternateSourceForInternalCalls": true,
     "isActiveDuringCallPark": false,
     "isActiveDuringBusyCampOn": false,
     "isActiveDuringCallHold": true,
     "source": {
          "audioFilePreferredCodec": "G722",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     },
     "internalSource": {
          "audioFilePreferredCodec": "G722",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     }
}
Status Codes:

Retrieve a list of departments that have a Music On Hold instance

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/music_on_hold/departments/

Retrieve a list of departments that have a Music On Hold instance.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/services/music_on_hold/departments/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
      "hasDepartment": true,
      "departments": [
          {
              "tenantId": "ApioSpTest",
              "groupId": "ApioGrpTest",
              "departmentName": "test_department_initial",
              "fullPathName": "test_department_parent_1 \\ test_department_initial"
          },
          {
              "tenantId": "ApioSpTest",
              "groupId": "ApioGrpTest",
              "departmentName": "test_department_available_parent_1",
              "fullPathName": "test_department_available_parent_1"
          }
      ]
}
Response JSON Object:
Status Codes:

Add department configuration

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/music_on_hold/departments/

Add the details about the Music On Hold of the department.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/services/music_on_hold/departments/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
     "useAlternateSourceForInternalCalls": true,
     "isActiveDuringCallPark": false,
     "internalSource": {
          "audioFilePreferredCodec": "G722",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     }
}
Request JSON Object:
  • useAlternateSourceForInternalCalls (boolean) – Indicate if the service has to use different source for internal calls

  • department (object) – An object as Group department key attributes.

  • isActiveDuringCallPark (boolean) – Indicate if the service is active during call park

  • isActiveDuringBusyCampOn (boolean) – Indicate if the service is active during busy camp on

  • isActiveDuringCallHold (boolean) – Indicate if the service is active during call hold

  • source (object) – a media source object as defined as Music On Hold Source Attributes defining the music that will be played for all calls.

  • internalSource (object) – an media source object as defined as 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 201 CREATED
Content-Type: "application/json"
Status Codes:

Retrieve department configuration

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/music_on_hold/department/(string: instance_name)/

Get the details about the Music On Hold of the department.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/services/music_on_hold/department/fooDepartmentName/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
     "serviceUserId": "test_user_id",
     "useAlternateSourceForInternalCalls": false,
     "isActiveDuringCallPark": true,
     "isActiveDuringBusyCampOn": false,
     "isActiveDuringCallHold": true,
     "source": {
          "audioFilePreferredCodec": "G711",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     },
     "internalSource": null
}
Response JSON Object:
  • serviceUserId (string) – Uniquely identifies a service provider.

  • useAlternateSourceForInternalCalls (boolean) – Indicate if the service has to use different source for internal calls

  • isActiveDuringCallPark (boolean) – Indicate if the service is active during call park

  • isActiveDuringBusyCampOn (boolean) – Indicate if the service is active during busy camp on

  • isActiveDuringCallHold (boolean) – Indicate if the service is active during call hold

  • source (object) – a source object as defined as Music On Hold Source Attributes

  • internalSource (object) – a source object as defined as Music On Hold Source Attributes

Status Codes:

Update department configuration

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/music_on_hold/department/(string: instance_name)/

Update the details about the Music On Hold of the department.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/services/music_on_hold/department/fooDepartmentName/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
     "useAlternateSourceForInternalCalls": true,
     "isActiveDuringCallPark": false,
     "internalSource": {
          "audioFilePreferredCodec": "G722",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     }
}
Request JSON Object:
  • useAlternateSourceForInternalCalls (boolean) – Indicate if the service has to use different source for internal calls

  • isActiveDuringCallPark (boolean) – Indicate if the service is active during call park

  • isActiveDuringBusyCampOn (boolean) – Indicate if the service is active during busy camp on

  • isActiveDuringCallHold (boolean) – Indicate if the service is active during call hold

  • source (object) – a media source object as defined as Music On Hold Source Attributes defining the music that will be played for all calls.

  • internalSource (object) – an media source object as defined as 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"

{
     "serviceUserId": "test_user_id",
     "useAlternateSourceForInternalCalls": true,
     "isActiveDuringCallPark": false,
     "isActiveDuringBusyCampOn": false,
     "isActiveDuringCallHold": true,
     "source": {
          "audioFilePreferredCodec": "G722",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     },
     "internalSource": {
          "audioFilePreferredCodec": "G722",
          "messageSourceSelection": "Custom",
          "audioFile": {
               "name": "APIO Group Test Announcement"
          }
     }
}
Status Codes:

Delete department configuration

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/music_on_hold/department/(string: instance_name)/

Delete the details about the Music On Hold of the department.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/services/music_on_hold/department/fooDepartmentName/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"
Status Codes:

Music On Hold Source Attributes

Name

Type

Methods

Description

GET

PUT

audioFilePreferredCodec

string

A

O

The codec of the audio file to use.

messageSourceSelection

string

A

O

The source to select “Custom” or “System”.

audioFile

object

O

O

An audio file object as defined as Announcement File Name