Query Material Library Categories
Updated: 2025-05-23 17:48:57
API Description
1、查询账号下的素材库分类列表
2、接口支持https协议
API URL
http://api.polyv.net/live/v4/material/category/list
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure security. API calls have frequency limits. Click for details
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See: Get Secret Key |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid within 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See: Signature Generation Rules |
| materialType | true | String | Material type video: Video image: Image document: Document text: Text & Image |
| parentId | false | Long | Parent category node ID, used to query subcategories |
Example
http://api.polyv.net/live/v4/material/category/list?materialType=video&appId=frlr1zazn3&sign=A69559D6EBF130B9C0F60807459FC311×tamp=1642733791590
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code, 200 for success, non-200 for failure |
| status | String | Response result determined by business logic, success returns "success", failure returns "error" |
| success | Boolean | Whether the request was successful |
| requestId | String | Request ID, a unique UUID generated for each request, for debugging and troubleshooting only, should not be tied to business logic |
| error | Object | Error information when status code is non-200 See: Error Field Description |
| data | Object | See: Data Field Description |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to identify the specific error |
| desc | String | Error description, corresponding to error.code |
Data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| contents | Array | Category list content See: Contents Field Description |
Contents Parameter Description
| Parameter | Type | Description |
|---|---|---|
| id | Long | Category ID |
| title | String | Category name |
| type | String | Category type DEFAULT: Default category CUSTOM: Custom category PLAYBACK: Video playback AI: AI video DISK_VIDEO: Pseudo-live video TEMP_STORE: Temporary storage PRODUCT_EXPLAIN: Product explanation |
| subCount | Integer | Number of subcategories |
Response Example
For global system error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "cb237e0e77bc49b59dda283638837d45.82.17479826520942187",
"data": {
"contents": [
{
"id": 454,
"title": "默认",
"type": "DEFAULT",
"subCount": 0
},
{
"id": 455,
"title": "自定义",
"type": "CUSTOM",
"subCount": 1
},
{
"id": 456,
"title": "视频回放",
"type": "PLAYBACK",
"subCount": 0
},
{
"id": 457,
"title": "AI视频",
"type": "AI",
"subCount": 0
},
{
"id": 458,
"title": "伪直播视频",
"type": "DISK_VIDEO",
"subCount": 0
},
{
"id": 459,
"title": "临时存储",
"type": "TEMP_STORE",
"subCount": 0
},
{
"id": 810,
"title": "测试新建素材库分类",
"type": "CUSTOM",
"subCount": 0
},
{
"id": 1530,
"title": "商品讲解",
"type": "PRODUCT_EXPLAIN",
"subCount": 0
}
]
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"error": {
"code": 10003,
"desc": "时间戳过期"
},
"success": false
}
