更新时间:2022-01-07 14:31:26
Query the list of materials, sorted in reverse order by upload time.
| Request method | POST/GET |
|---|---|
| Interface Address | https://api.cloudv.haplat.net/vod/material/getMaterialList |
| Content-Type | Only supports application/json |
| If token is needed | Authentication method V3 |
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| materialId | string | no | Material ID |
| materialName | string | no | Material name (fuzzy query) |
| suffix | string | no | Material suffix |
| createUser | string | no | Create User |
| publishDomain | string | no | Publish domain name |
| uploadTimeStart | int | no | Query start time, query according to upload time, second-level timestamp, and no later than query end time. |
| uploadTimeEnd | int | no | Query end time, query based on the upload time, second-level timestamp, and not earlier than query start time. |
| pageIndex | int | no | Take the first few pages of the material list, start from 1, and the default is 1. |
| pageSize | int | no | The average number of materials per page, the value range is 1-50, and the default is 10. |
For common return results, please refer to the Return Result.
Data structure of the data parameter returned when the return result is successful
| Parameter | Type | Remarks |
|---|---|---|
| total | string | The total number of materials that meet the query conditions |
| materialList | array | Material list |
MaterialList array element data structure
| Parameter | Type | Remarks |
|---|---|---|
| id | string | Material ID |
| name | string | Material name |
| suffix | string | File suffix |
| fileSize | long | File size (unit is bit) |
| url | string | File url |
| createUser | string | Create User |
| createTime | int | Creation time |
Input example
curl -X POST http://api.cloudv.haplat.net/vod/material/getSubtitleList
-H 'content-type: application/json'
-H "Host: api.cloudv.haplat.net"
<公共的头部参数>
<自定义的头部参数>
-d '{"pageIndex":"1","pageSize":"3"}'
Output example
{
"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": "操作成功"
}
The following error codes are related to interface service logic, the generic error code can be found at Return Result.
| Error code | Description |
|---|---|
| 1301 | User has no permission |
| 1004 | Parameter error, please make sure all required fields have been filled in |
| 1000 | Material id does not exist |
| 1407 | Start time cannot be larger than the end time |