Call getMaterialList to get the information list of uploaded material
Name | Description |
---|---|
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 |
Name | Description |
---|---|
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(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
1301 | User has no permission | 200 | User has no permission |
1004 | The parameter is incorrect. Please ensure that all required fields are filled in | 200 | The parameter is incorrect. Please ensure that all required fields are filled in |
1000 | The material id does not exist | 200 | The material id does not exist |
1407 | The start time cannot be later than the end time | 200 | The start time cannot be later than the end time |
#!/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
}'
{
"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"
}