GetMaterialList

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

Call getMaterialList to get the information list of uploaded material

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

Request

Body Params

NameDescription
materialIdString
Material ID
materialNameString
Material name (fuzzy query)
suffixString
Material suffix
createUserString
Create a user
publishDomainString
Publish domain name
uploadTimeStartInteger
The query start time is based on the upload time. The query end time cannot be later than the timestamp in seconds
uploadTimeEndInteger
The query end time is based on the upload time. The timestamp is in seconds and cannot be earlier than the query start time
pageIndexString
The page in the material list starts with 1. The default value is 1
pageSizeString
Average Number of materials per page. The value ranges from 1 to 50. The default value is 10

Response

Body Params

NameDescription
codeInteger
Result status code, 200 indicates success
messageString
Return message
dataObject
Return data
totalInteger
Total number of materials that match search conditions
materialListList
Material list
idString
Material ID
nameString
Material name
suffixString
File suffix
fileSizeLong
File size (unit: bit)
urlString
File url
createUserString
Create user
createTimeInteger
Create time

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 material id does not exist200The material id does not exist
1407The 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/material/getMaterialList" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "x-cnc-auth-method: BASIC" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
	"materialId":"XXXXXXXXXXX",
	"materialName":"name",
	"suffix":"jpg",
	"createUser":"testUser",
	"publishDomain":"xxx.com",
	"uploadTimeStart":1669950908,
	"uploadTimeEnd":1669976108,
	"pageIndex":1,
	"pageSize":10
}'
Response example
Copy Copy success
{
    "code": 200,
    "data": {
        "materialList": [
            {
                "createTime": 1563429555,
                "createUser": "ovptest",
                "fileSize": 1794,
 		"id": "03a9caea016c10009634a00200000000",
		"name": "test01",
                "suffix": "jpg",
                "url":"http://ovptest.haplat.net/cloudv-material/20190718/03a9caea016c10008sd1276200000000.jpg"
            }
			{
                "createTime": 1563429556,
                "createUser": "ovptest",
                "fileSize": 1794,
 		"id": "03a9caea016c1000963hj00200000000",
		"name": "test02",
                "suffix": "jpg",
                "url":"http://ovptest.haplat.net/cloudv-material/20190718/03a9caea016c100084bf276200000000.jpg"
            }
			{
                "createTime": 1563429557,
                "createUser": "ovptest",
                "fileSize": 1794,
 		"id": "03a9caea016c1000963ao00200000000",
		"name": "test03",
                "suffix": "jpg",
                "url":"http://ovptest.haplat.net/cloudv-material/20190718/03a9caea016c1000bjf1276200000000.jpg"
            }
        ],
        "total":3
    },
    "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!