Manage your MOH.
Retrieve a collection of moh musics.
GET /api/moh_server/musics HTTP/1.1 Host: hostname:8887 Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
OK
{ "items": [] }
Retrieve a moh music.
The unique ID of MOH music.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYw
GET /api/moh_server/musics/{id} HTTP/1.1 Host: hostname:8887 Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
{ "id": "NzAwNTUxOTA5NzczMTQ4MTYw", "file_name": "text", "file_size": 0, "file_url": "/api/blobs/WexWdABcd5D4PDgzTKV3gAAAEu00WcK" }
Delete a MOH music
POST /api/moh_server/musics/{id}/destroy HTTP/1.1 Host: hostname:8887 Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
No Content
No content
Retrieve moh server information.
GET /api/moh_server HTTP/1.1 Host: hostname:8887 Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
{ "enabled": true, "play_type": "DEFAULT_MUSIC" }
Update moh server
Enable MOH service or not.
Set MOH personalized music by these modes:
DEFAULT_MUSIC
RANDOM_MUSIC_PER_CALL
RANDOM_MUSIC_PER_DAY
POST /api/moh_server HTTP/1.1 Host: hostname:8887 Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* Content-Length: 44 { "enabled": true, "play_type": "DEFAULT_MUSIC" }
Create a MOH music.
The unique ID of the file.
POST /api/moh_server/musics HTTP/1.1 Host: hostname:8887 Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* Content-Length: 38 { "file_id": "NzAwNTUxOTA5NzczMTQ4MTYw" }
Created MOH music
{ "id": "NzAwNTUxOTA5NzczMTQ4MTYw" }