Update a MOH Playlist
Updates a music-on-hold playlist and returns the updated playlist.
Request URL
PUT {base_url}/uc-cconfig/api/v1/sounds/moh-playlists/{id}
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Path parameters
-
Parameter Required Type Description id Yes String The ID of the MOH playlist to update. You can obtain the ID using the Search MOH Playlists interface.
- Body parameters
-
Parameter Required Type Description name No String The name of the MOH playlist. playMode No String The play mode of the playlist.
Valid value:
PLAY_MODE_RANDOM: Play the audio items in random order.PLAY_MODE_ALPHABETICAL: Play the audio items in alphabetical order.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<MOH_Playlist> | The updated MOH playlist. |
- MOH_Playlist
-
Parameter Type Description id String The ID of the MOH playlist. name String The name of the MOH playlist. isDefault Boolean Whether the playlist is the system default playlist.
true: The playlist is the system default playlist.false: The playlist is a custom playlist.
playMode String The play mode of the playlist:
PLAY_MODE_RANDOM: Play the audio items in random order.PLAY_MODE_ALPHABETICAL: Play the audio items in alphabetical order.
itemCount Integer The number of audio items in the playlist. totalFileSize String The total size of the audio items in the playlist, in bytes. createdAt String The time when the playlist was created, in Unix timestamp format (milliseconds). updatedAt String The time when the playlist was last updated, in Unix timestamp format (milliseconds).
Example
Request example
PUT /uc-cconfig/api/v1/sounds/moh-playlists/374482427330256896 HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzM3MjM2NiwiaWF0IjoxNzkzMzUwNzY2LCJqdGkiOiJhYmM1M2JhNC1jM2RhLTQ3NWEtOTJiYi1hNGVhYzYxYjJhNWUiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.ZZkUU4v0bILJ01O4E2XXnyKr1FtMZiwdzdRZVuqgRe6s68jttCX15-bKV5DDjoRlCaD-oy4T1KuuEMps_bBpnI9kRYJ6GiJSXwaUkUQATbwEWNWpwIUBQ1fIxFGTiLEA58DERy9Fjl9LRRVvdvhz1RtWS_RNMqFPfbGbON2cl8J6jBGIxb3AVpy_fOwhXSGaPYCGxmKOJalbeZ_LuwQ_SFUcQsaO8kftD09rtmZvXnA9hadhrF1qDvV8VTvd5xlbJDlKvkeo7HgYuLdigFbENuD3zgjJPTEZe9qrVCqWhlvTtNa_YIeMS2p05DWCF7zM0NwPOPLRmOLe_Uq35SMsGw
x-tenant-code: jint
Content-Type: application/json
{
"name": "TestPlaylist-Upd",
"playMode": "PLAY_MODE_RANDOM"
}
Response example
HTTP/1.1 200 OK { "requestId": "ecefd5f68a3d5b930b3aeabf6e1e1683", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "374482427330256896", "name": "TestPlaylist-Upd", "isDefault": false, "playMode": "PLAY_MODE_RANDOM", "itemCount": 0, "totalFileSize": "0", "createdAt": "1793350768223", "updatedAt": "1793350768494" } }