Table of Contents

API : PBX : Music on hold Get

Introduction

This request will return a single music on hold class.

Request

URL https://api.telecomx.dk/pbx/musiconhold/MOH_ID
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
ADMIN.
Param MOH_ID Id of the music on hold class (24 hex-char string)

Query examples

https://api.telecomx.dk/pbx/musiconhold/1234567890ABCDEF12345678

Response

JSON object
_id Id Unique id of the MOH.
customer Id Id of the customer the MOH belongs to, null if it is a common MOH that can be used by all customers.
name String Name of the MOH.
random Boolean True to randomize the songs, false to playback in listed order.
Array of audio files (songs) to play.
audio[].id Id Id of the song.
audio[].name String Filename.
audio[].length Number Length of song in seconds.

Example

{
  _id: ObjectID('12345678901234567890ABCD'),
  customer: ObjectID('12345678901234567890ABCD'),
  name: 'Soft (license free)',
  random: true,
  audio: [
    {
      id: '123456789012345678900001',
      name: 'Smooth sailing',
      length: 362
    },
    {
      id: '123456789012345678900001',
      name: 'By the riverside',
      length: 362
    }
  ]
}

Errors

Error code Message Description
404 id Music on hold not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>