Get category list
Name | Description |
---|---|
parentNodeIdString | Id of the parent node. If empty, finds all first-level category tags |
pageSizeInteger | Number of items per page The value ranges from 1 to 100. The default value is 10 |
pageIndexInteger | Index of page The value starts from 1. The default value is 1 |
Name | Description |
---|---|
codeInteger | Result status code, 200 indicates success |
messageString | Return message |
dataList | Return data |
totalLong | Total number of data items |
pageSizeLong | Returns the number of data bars |
pageIndexLong | Return to page number |
categoryListList | Data detail list |
labelNameString | Label name |
parentNodeIdInteger | ID of the upper-layer node. A Tier 1 node has no upper-level node. Only secondary nodes have parent nodes |
nodeIdInteger | Tag node ID |
createUserString | Create a user |
Error code(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
24112000 | Parameter error | 400 | Parameter error |
1000 | The parent classification node ID does not exist or has been deleted | 200 | The parent classification node ID does not exist or has been deleted |
#!/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/videoCategory/getCategoryList" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "x-cnc-auth-method: BASIC" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"parentNodeId": "id1",
"pageSize": 10,
"pageIndex": 1
}'
{
"code": 200,
"message": "Operation succeeded"
"data": {
"total":2
"pageSize":10
"pageIndex":1
"categoryList": [
{
"labelName":"movie1",
"parentNodeId":1,
"nodeId":2,
"createUser":"vcloudtest"
},
{
"labelName":"movie2",
"parentNodeId":1,
"nodeId":3,
"createUser":"vcloudtest"
}
]
}
}