Available in Classic and VPC
Add an encoding file to a category.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
PUT | /api/v2/category/{categoryId}/add-files |
Request headers
For information about the headers common to all VOD Station APIs, see VOD Station request headers.
Request path parameters
You can use the following path parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
categoryId |
String | Required | Category ID
|
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
bucketName |
String | Conditional | Name of the bucket where the input file is stored
|
pathList |
Array | Conditional | Detailed path to the bucket for the input file, including file name
|
httpDownloadUrlList |
Array | Conditional | HTTP URL path to the input file, including file name
|
notification |
String | Optional | Callback URL settings for the input file
|
output |
Object | Optional | Output settings for the input file |
output.bucketName |
String | Required | Bucket name to save the output file |
output.filePath |
String | Required | Detailed path to save the output file
|
output.thumbnailBucketName |
String | Optional | Name of bucket to store thumbnail extract files in
|
output.thumbnailFilePath |
String | Optional | Detailed path to store thumbnail extract files to
|
output.accessControl |
String | Optional | Output file disclosure scope
|
output.thumbnailAccessControl |
String | Optional | Extracted thumbnail disclosure scope
|
output.withoutCategoryName |
Boolean | Optional | Whether to create a category name directory in the storage path
|
setAdvancedOptions |
Boolean | Optional | Advanced settings
|
advancedOptions |
Object | Optional | Advanced settings |
advancedOptions.trimming |
Object | Optional | Output file trimming (playback section) settings |
advancedOptions.trimming.startTimeCode |
String | Required | Trimming start point (HH:MM:SS.S) |
advancedOptions.trimming.endTimeCode |
String | Required | Trimming end point (HH:MM:SS.S)
|
advancedOptions.imageOverlay |
Object | Optional | Image overlay (insertion) settings |
advancedOptions.imageOverlay.input |
Object | Required | Image settings |
advancedOptions.imageOverlay.input.bucketName |
String | Required | Name of the bucket where the image is saved |
advancedOptions.imageOverlay.input.filePath |
String | Required | Detailed path of the image including the file name |
advancedOptions.imageOverlay.position |
Object | Required | Image location settings |
advancedOptions.imageOverlay.position.x |
Integer | Required | Location of x-axis (pixel) |
advancedOptions.imageOverlay.position.y |
Integer | Required | Location of y-axis (pixel) |
advancedOptions.imageOverlay.size |
Object | Required | Image size settings |
advancedOptions.imageOverlay.size.width |
Integer | Required | Image width (pixel) |
advancedOptions.imageOverlay.size.height |
Integer | Required | Image height (pixel) |
Request example
The request example is as follows:
curl --location --request PUT 'https://vodstation.apigw.ntruss.com/api/v2/category/*****/add-files' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
"httpDownloadUrlList": [
"https://kr.object.ncloudstorage.com/station-000-input/VODStation2.mp4"
],
"notification": "https://example.com/callback",
"output": {
"bucketName": "station-000",
"filePath": "/",
"thumbnailBucketName": "station-000",
"thumbnailFilePath": "/thumbnail",
"accessControl": "PUBLIC_READ",
"thumbnailAccessControl": "PUBLIC_READ",
"withoutCategoryName": false
},
"setAdvancedOptions": true,
"advancedOptions": {
"trimming": {
"startTimeCode": "00:00:00.0",
"endTimeCode": "00:08:00.9"
},
"imageOverlay": {
"input": {
"bucketName": "station-000",
"filePath": "/VODStation.png"
},
"position": {
"x": 50,
"y": 50
},
"size": {
"width": 50,
"height": 50
}
}
}
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
content |
Array | - | Result of adding an encoding file to the category: content |
content
The following describes content
.
Field | Type | Required | Description |
---|---|---|---|
id |
Integer | - | File encoding job ID
|
status |
String | - | File encoding status
|
output |
Object | Required | Category output settings |
output.bucketName |
String | Required | Bucket name to save the output file |
output.filePath |
String | Required | Detailed path to save the output file |
output.accessControl |
String | - | Output file disclosure scope
|
output.thumbnailAccessControl |
String | - | Extracted thumbnail disclosure scope
|
output.withoutCategoryName |
Boolean | - | Whether to create a category name directory in the storage path
|
output.thumbnailOutput |
Object | - | Thumbnail extraction settings information |
output.thumbnailOutput.bucketName |
String | - | Bucket name to save the thumbnail extraction file |
output.thumbnailOutput.filePath |
String | - | Detailed path to save the thumbnail extraction file |
setAdvancedOptions |
Boolean | - | Advanced settings |
advancedOptions |
Object | - | Advanced settings information
|
advancedOptions.trimming |
Object | - | Output file trimming (playback section) settings |
advancedOptions.trimming.startTimeCode |
String | - | Trimming start point (HH:MM:SS.S) |
advancedOptions.trimming.endTimeCode |
String | - | Trimming end point (HH:MM:SS.S) |
advancedOptions.imageOverlay |
Object | - | Image overlay (insertion) settings |
advancedOptions.imageOverlay.input |
Object | - | Image settings information |
advancedOptions.imageOverlay.input.bucketName |
String | - | Name of the bucket where the image is saved |
advancedOptions.imageOverlay.input.filePath |
String | - | Detailed path of the image including the file name |
advancedOptions.imageOverlay.size |
Object | - | Image size information |
advancedOptions.imageOverlay.size.width |
Integer | - | Image width (pixel) |
advancedOptions.imageOverlay.size.height |
Integer | - | Image height (pixel) |
advancedOptions.imageOverlay.position |
Object | - | Location settings of image to be inserted |
advancedOptions.imageOverlay.position.x |
Integer | - | Location of x-axis (pixel) |
advancedOptions.imageOverlay.position.y |
Integer | - | Location of y-axis (pixel) |
httpDownloadUrl |
String | - | HTTP URL to download externally |
Response status codes
For information about the HTTP status codes common to all VOD Station APIs, see VOD Station response status codes.
Response example
The response example is as follows:
{
"content": [
{
"id": *******,
"status": "WAITING",
"output": {
"bucketName": "station-000",
"filePath": "/",
"accessControl": "PUBLIC_READ",
"thumbnailAccessControl": "PUBLIC_READ",
"withoutCategoryName": false,
"thumbnailOutput": {
"bucketName": "station-000",
"filePath": "/thumbnail"
}
},
"setAdvancedOptions": true,
"advancedOptions": {
"trimming": {
"startTimeCode": "00:00:00.0",
"endTimeCode": "00:08:00.9"
},
"imageOverlay": {
"input": {
"bucketName": "station-000",
"filePath": "/VODStation.png"
},
"size": {
"width": 50,
"height": 50
},
"position": {
"x": 50,
"y": 50
}
}
},
"httpDownloadUrl": "https://kr.object.ncloudstorage.com/station-000-input/VODStation2.mp4"
}
]
}