Search MOH Playlist Items

Searches the audio items of a music-on-hold playlist with pagination.

Request URL

POST {base_url}/uc-cconfig/api/v1/sounds/moh-playlists/{id}/items/search-page

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. You can obtain the ID using the Search MOH Playlists interface.
Body parameters
Parameter Required Type Description
pageNumber No Integer The page number to retrieve.
pageSize No Integer The number of records to retrieve per page.
sourceTypes No Array<String>

The list of audio item sources to filter by.

Valid value:

  • SOURCE_TYPE_UPLOAD: The audio file is uploaded.
  • SOURCE_TYPE_USER_RECORD: The audio file is recorded from a mobile phone.
keyword No String The keyword used to search for audio items by name.

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.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
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<Items_Search_Result> The search result of the audio items.
Items_Search_Result
Parameter Type Description
pageSize Integer The number of records per page.
pageNumber Integer The current page number.
count String The total number of matching records.
results Array<MOH_Playlist_Item> The list of audio items on the current page.
MOH_Playlist_Item
Parameter Type Description
id String The ID of the audio item.
sourceType String

The source of the audio item:

  • SOURCE_TYPE_UPLOAD: The audio file is uploaded.
  • SOURCE_TYPE_USER_RECORD: The audio file is recorded from a mobile phone.
name String The name of the audio item.
fileName String The name of the audio file in the storage.
fileSize String The size of the audio file, in bytes.
durationMs Integer The duration of the audio file, in milliseconds.
resourceId String The ID of the audio file resource in the resource service.
text String The text content of the audio item.
createdAt String The time when the audio item was created, in Unix timestamp format (milliseconds).

Example

Request example

POST /uc-cconfig/api/v1/sounds/moh-playlists/338596681041158144/items/search-page HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ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WCF7zM0NwPOPLRmOLe_Uq35SMsGw
x-tenant-code: jint
Content-Type: application/json
{
  "pageNumber": 1,
  "pageSize": 10
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "ad6c76377c43b40618df58ab109d2655",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "pageSize": 10,
    "pageNumber": 1,
    "count": "2",
    "results": [
      {
        "id": "338596802441093120",
        "sourceType": "SOURCE_TYPE_UPLOAD",
        "name": "welcome.wav",
        "fileName": "d8cbba8a-ed21-443b-849a-3f4198933507.wav",
        "fileSize": "127054",
        "durationMs": 7936,
        "resourceId": "2080206982001709057",
        "text": "",
        "createdAt": "1784794968526"
      },
      {
        "id": "338596986004807680",
        "sourceType": "SOURCE_TYPE_USER_RECORD",
        "name": "Test",
        "fileName": "a695cd4b-3429-4c43-a2c3-afb0c401b7be.wav",
        "fileSize": "79084",
        "durationMs": 4940,
        "resourceId": "2080207169080250370",
        "text": "",
        "createdAt": "1784795012291"
      }
    ]
  }
}