GetAudioList

Update time: 2024-07-29 17:00:01

Query the list of audio files and sort them in reverse order by upload time. Support paging to get a list

  • Single user trigger frequency: 300/5min
  • Applicable Products: Cloud VoD

Request

Body Params

NameDescription
createUserString
Create a user. The value is blank by default. Multiple entries are allowed. They are separated by commas (,) and cannot start or end with a comma. This parameter is restricted by permissions. Only sub-accounts or users with special permissions can be queried.
startTimeString
The start time is in the format of 2016-01-01 12:00:00. It is used to query the audio according to the creation time range.
endTimeString
The query end time is in the format of 2016-01-01 12:00:00. This parameter is used to query audio files within the creation period, which is smaller than the current query time.
audioNameString
Audio name, used to filter audio, support fuzzy matching;
audioIdString
Audio ID, used to filter audio;
listOrderString
The value range is · 0(in descending order by creation time)· 1(in ascending order by creation time) The default value is 0
pageIndexString
The page of the audio list starts with 1. The default value is 1. The product of pageIndex and pageSize must be less than 100000.
pageSizeString
Average number of audio files per page. The value ranges from 1 to 50. The default value is 10. The product of pageIndex and pageSize must be less than 100000

Response

Body Params

NameDescription
codeInteger
Return status code
dataObject
audioGetListResponseListList
audioNameString
Audio name
audioIdString
Audio ID
createUserString
Create user
audioSizeInteger
The space occupied by audio, and the total space used by video and video after transcoding
audioDurationInteger
Audio duration
urlString
File url
suffixString
File suffix
createTimeInteger
Create time
uploadTimeInteger
Upload time
audioTotalInteger
Audio upload time
messageString
Return message

Error code

Error code(code)Description(message)HTTP statusSemantic
1301User has no permission200User has no permission
1004The parameter is incorrect. Please ensure that all required fields are filled in200The parameter is incorrect. Please ensure that all required fields are filled in
1000The start time cannot be later than the end time200The start time cannot be later than the end time

Example

JSON
JSON
Request example
Copy Copy success
#!/bin/bash
username='example_username'
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/vod/audioManage/getAudioList" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "x-cnc-auth-method: BASIC" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
    "createUser": "ovptest"
}'
Response example
Copy Copy success
{
	"code": 200,
	"data": {
		"audioGetListResponseList": [{
				"audioSize": 2137289,
				"audioName": "xxx1",
				"createTime": 1639106397,
				"audioId": "a25abe3b017d100069b7ee4600000000",
				"createUser": "ovptest",
				"audioDuration": 127.0,
				"suffix": "mp3",
				"uploadTime": 1639106397,
				"url": "http://ovptest.haplat.net/audio/202112/a25abe3b017d100047ab42b200000000_1639106395/a25abe3b017d100047ab42b200000000.mp3"
			},
			{
				"audioSize": 8954211,
				"audioName": "xxx",
				"createTime": 1636511945,
				"audioId": "07b67c28017d1000b0c740cd00000000",
				"createUser": "ovptest",
				"audioDuration": 221.0,
				"suffix": "mp3",
				"uploadTime": 1636511945,
				"url": "http://ovptest.haplat.net/audio/202111/07b67c28017d100027d6d67a00000000_1636511939/07b67c28017d100027d6d67a00000000.mp3"
			}
		],
		"audioTotal": 2
	},
	"message": "Operation succeeded"
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!