API Center
Introduction
API-Key Authentication
AK/SK Authentication
APM
Edge Application
CDN Pro
Edge Computing Hosting
IAM
Media Acceleration Live Broadcast
Media Acceleration-Live
Media Acceleration
Cloud Live
Low Latency Streaming
Cloud VoD
Bandwidth Report
StatusCode Report
Upload Assets
Manage Assets
GetVideoList
VideoEdit
VideoBlock
VideoEnable
DeleteVideo
DeleteMaterial
GetMaterialList
MaterialEdit
DeleteAudio
GetAudioList
EditAudio
DeleteVideoByCategory
DeleteCategory
CreateCategory
GetCategoryList
Media Processing
Playback
API Shield
Application Shield
Web Application Firewall
Flood Shield
Cloud Security 2.0
Bot Shield
Flood Shield 2.0
Dynamic Web Acceleration
Content Acceleration
CloudDNS
Object Storage
Local Storage
Certificate MGMT
Content MGMT
IP Verification
Cloud Monitor
Log Download
Others

CreateCategory

Update time: 2024-07-29 16:46:38

Create category

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

Request

Body Params

NameDescription
parentNodeIdInteger
Id of the parent node. If it is empty, create the parent node
*labelNameString
Label name (32 characters supported)

Response

Body Params

NameDescription
codeInteger
Result status code, 200 indicates success
messageString
Return message
dataList
Return data
nodeIdLong
Tag node ID

Error code

Error code(code)Description(message)HTTP statusSemantic
24112000Parameter error400Parameter error
1000The parent classification node ID does not exist or has been deleted200The parent classification node ID does not exist or has been deleted
1000The category name cannot be empty200The category name cannot be empty
1000The format of the category name is incorrect200The format of the category name is incorrect
1000Class name duplication200Class name duplication

Example

JSON
JSON
Request example
Copy
#!/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/createCategory" \
-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",
        "labelName": "name"
}'
Response example
Copy
{
    "code": 200,
    "message": "Operation succeeded"
    "data": {
        "nodeId":123
     }
}

Directory

  • Request
  • Response
  • Error code
  • Example
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!