Creating category
- Print
- PDF
Creating category
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
VOD Station provides an API for creating categories, and provides Category list search API and Category information search API to search for created categories.
Requests
POST https://vodstation.apigw.ntruss.com/api/v2/category
Request headers
Header name | Description |
---|---|
x-ncp-region_code | NAVER Cloud Platform's region code x-ncp_region_code:{Region Code} |
x-ncp-apigw-timestamp | This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-iam-access-key | Access key ID value issued by the NAVER Cloud Platform portalx-ncp-iam-access-key:{Sub Account Access Key} |
x-ncp-apigw-signature-v2 | Signature encrypted with the Access Key ID value and Secret Keyx-ncp-apigw-signature-v2:{API Gateway Signature} |
Content-Type | Specify the request body content type as application/jsonContent-Type: application/json |
Request body
API field names in the request body are case sensitive.
Field name | Requirement status | Type | Restrictions | Default value | Description |
---|---|---|---|---|---|
name | Yes | String | - Name of the category to be created Automatically create a folder with the category name in output.bucketName. | ||
encodingOptions[] | No | Array(Integer) | NULL | Encoding option to be set in the category | |
encodingOptionTemplateId | No | Integer | - Encoding template ID Enter the ID identified by searching for the encoding template. Set encodingOptionId included in the template as the encodingOptions[] field value. You can't set IDs other than encodingOptionId in the template as the encodingOptions[] field value. | ||
thumbnail | No | Boolean | true, false | FALSE | Thumbnail extraction settings |
notificationUrl | No | String | Callback URL settings | ||
output | Yes | Object | Category output settings | ||
output.bucketName | Yes | String | Output bucket name | ||
output.filePath | Yes | String | Enter between 1 and 256 characters. (English letters, numbers, and special characters except for < > : " / \ ? * % are allowed.) | Detailed path to upload the output file | |
output.thumbnailBucketName | Optional | String | If not entered, follow the output.bucketName settings. | Thumbnail output bucket name | |
output.thumbnailFilePath | Optional | String | If not entered, follow the output.filePath settings. Enter between 1 and 256 characters. (English letters, numbers, and special characters except for < > : " / \ ? * % are allowed.) | Detailed path to upload the thumbnail output file | |
output.accessControl | No | String | PUBLIC_READ, PRIVATE | PRIVATE | Disclosure scope of the output file |
output.thumbnailAccessControl | No | String | PUBLIC_READ, PRIVATE | PRIVATE | Disclosure scope of the output thumbnail |
advancedOptions | No | Object | NULL | Advanced settings | |
advancedOptions.trimming | No | Object | NULL | Output file trimming settings | |
advancedOptions.trimming.startTimeCode | Yes | String | Format: "HH:MM:SS.S" | - Trimming start point Enter the value to fit the timecode format. | |
advancedOptions.trimming.endTimeCode | Yes | String | Format: "HH:MM:SS.S", A smaller value than the startTimeCode can't be entered. | - Trimming end point Enter the value to fit the timecode format. | |
advancedOptions.imageOverlay | No | Object | NULL | Image overlay settings | |
advancedOptions.imageOverlay.input | Yes | Object | Input image | ||
advancedOptions.imageOverlay.input.bucketName | Yes | String | Name of the bucket where the input image has been uploaded | ||
advancedOptions.imageOverlay.input.filePath | Yes | String | Detailed path of the input image including the file name | ||
advancedOptions.imageOverlay.position | Yes | Object | Location settings of image to be inserted | ||
advancedOptions.imageOverlay.position.x | Yes | Integer | Location of x-axis | ||
advancedOptions.imageOverlay.position.y | Yes | Integer | Location of y-axis | ||
advancedOptions.imageOverlay.size | Yes | Obejct | Size settings of image to be inserted | ||
advancedOptions.imageOverlay.size.width | Yes | Integer | Image width | ||
advancedOptions.imageOverlay.size.height | Yes | Integer | Image height |
Responses
Field name | Type | Description | Remarks |
---|---|---|---|
error | Object | Responds when a request fails Error response code and message | |
error.code | Integer | Error response code | |
error.message | String | Error response message | |
content | Object | VOD Station OPEN API response object | |
content.id | String | ID of the created category | |
content.name | String | Category name | |
content.encodingOptions[] | Array(Integer) | Encoding option ID | |
content.encodingOptionTemplateId | Integer | Encoding template ID | |
content.thumbnail | Boolean | Thumbnail extraction settings | |
content.notificationUrl | String | Callback URL settings | |
content.output | Object | Output settings | |
content.output.bucketName | String | Output bucket name | |
content.output.filePath | String | Detailed path to upload the output file | |
content.output.thumbnailBucketName | String | Thumbnail output bucket name | |
content.output.thumbnailFilePath | String | Thumbnail output file upload detailed path | |
content.output.accessControl | String | Disclosure scope of the output file | |
content.output.thumbnailAccessControl | String | Disclosure scope of the output thumbnail | |
content.status | String | Category status | CREATED, DELETED, RUNNING |
content.createTime | Integer | Category creation time | |
content.updateTime | Integer | Category editing time | |
content.disabled | Boolean | Filed provided to sub accounts Resource activation status for the Sub Account | |
content.outputType | Integer | Number of output types according to the encoding settings | |
content.advancedOptions | Object | Advanced settings | |
content.advancedOptions.trimming | Object | Output file trimming settings | |
content.advancedOptions.trimming.startTimeCode | String | Trimming start point | |
content.advancedOptions.trimming.endTimeCode | String | Trimming end point | |
content.advancedOptions.imageOverlay | Object | Image overlay settings | |
content.advancedOptions.imageOverlay.input | Object | Input image | |
content.advancedOptions.imageOverlay.input.bucketName | String | Name of the bucket where the input image has been uploaded | |
content.advancedOptions.imageOverlay.input.filePath | String | Detailed path of the input image | |
content.advancedOptions.imageOverlay.position | Object | Location settings of image to be inserted | |
content.advancedOptions.imageOverlay.position.x | Integer | Location of x-axis | |
content.advancedOptions.imageOverlay.position.y | Integer | Location of y-axis | |
content.advancedOptions.imageOverlay.size | Obejct | Size settings of image to be inserted | |
content.advancedOptions.imageOverlay.size.width | Integer | Image width | |
content.advancedOptions.imageOverlay.size.height | Integer | Image height |
Examples
Request examples
POST https://vodstation.apigw.ntruss.com/api/v2/category
POST /api/v2/category
HOST: vodstation.apigw.ntruss.com
Content-Type: application/json
x-ncp-region_code:KR
x-ncp-apigw-timestamp:1521787414578
x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
Reqeust body
{
"encodingOptions": [
1, 2, 3
],
"name": "3type-basic-category",
"output": {
"bucketName": "vs-output",
"filePath": "/"
},
"thumbnail": false
}
Response examples
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2018 09:53:32 GMT
Content-Type: application/json;charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
{
"content": {
"disabled": false,
"id": 10095,
"name": "3type-basic-category",
"thumbnail": false,
"output": {
"bucketName": "vs-output",
"filePath": "/"
},
"createTime": 1631594152000,
"updateTime": 1631594152000,
"status": "CREATED",
"outputType": 3,
"encodingOptions": [
1,
2,
3
]
}
}
Callback body example
{
"categoryId":10268,
"categoryName":"callback-test",
"encodingOptionId":3,
"fileId":10808,
"filePath":"/.../Guide720_AVC_HD_1Pass_30fps.mp4",
"outputType":"AVC_HD_1Pass_30fps",
"status":"RUNNING"
}
Was this article helpful?