MENU
      Creating category
        • PDF

        Creating category

        • PDF

        Article summary

        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
        HTTP

        Request headers

        Header nameDescription
        x-ncp-region_codeNAVER Cloud Platform's region code
        x-ncp_region_code:{Region Code}
        x-ncp-apigw-timestampThis 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-keyAccess key ID value issued by the NAVER Cloud Platform portal
        x-ncp-iam-access-key:{Sub Account Access Key}
        x-ncp-apigw-signature-v2Signature encrypted with the Access Key ID value and Secret Key
        x-ncp-apigw-signature-v2:{API Gateway Signature}
        Content-TypeSpecify the request body content type as application/json
        Content-Type: application/json

        Request body

        API field names in the request body are case sensitive.

        Field nameRequirement statusTypeRestrictionsDefault valueDescription
        nameYesString- Name of the category to be created
        Automatically create a folder with the category name in output.bucketName.
        encodingOptions[]NoArray(Integer)NULLEncoding option to be set in the category
        encodingOptionTemplateIdNoInteger- 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.
        thumbnailNoBooleantrue, falseFALSEThumbnail extraction settings
        notificationUrlNoStringCallback URL settings
        outputYesObjectCategory output settings
        output.bucketNameYesStringOutput bucket name
        output.filePathYesStringEnter between 1 and 256 characters. (English letters, numbers, and special characters except for < > : " / \ ? * % are allowed.)Detailed path to upload the output file
        output.thumbnailBucketNameOptionalStringIf not entered, follow the output.bucketName settings.Thumbnail output bucket name
        output.thumbnailFilePathOptionalStringIf 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.accessControlNoStringPUBLIC_READ, PRIVATEPRIVATEDisclosure scope of the output file
        output.thumbnailAccessControlNoStringPUBLIC_READ, PRIVATEPRIVATEDisclosure scope of the output thumbnail
        advancedOptionsNoObjectNULLAdvanced settings
        advancedOptions.trimmingNoObjectNULLOutput file trimming settings
        advancedOptions.trimming.startTimeCodeYesStringFormat: "HH:MM:SS.S"- Trimming start point
        Enter the value to fit the timecode format.
        advancedOptions.trimming.endTimeCodeYesStringFormat: "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.imageOverlayNoObjectNULLImage overlay settings
        advancedOptions.imageOverlay.inputYesObjectInput image
        advancedOptions.imageOverlay.input.bucketNameYesStringName of the bucket where the input image has been uploaded
        advancedOptions.imageOverlay.input.filePathYesStringDetailed path of the input image including the file name
        advancedOptions.imageOverlay.positionYesObjectLocation settings of image to be inserted
        advancedOptions.imageOverlay.position.xYesIntegerLocation of x-axis
        advancedOptions.imageOverlay.position.yYesIntegerLocation of y-axis
        advancedOptions.imageOverlay.sizeYesObejctSize settings of image to be inserted
        advancedOptions.imageOverlay.size.widthYesIntegerImage width
        advancedOptions.imageOverlay.size.heightYesIntegerImage height

        Responses

        Field nameTypeDescriptionRemarks
        errorObjectResponds when a request fails
        Error response code and message
        error.codeIntegerError response code
        error.messageStringError response message
        contentObjectVOD Station OPEN API response object
        content.idStringID of the created category
        content.nameStringCategory name
        content.encodingOptions[]Array(Integer)Encoding option ID
        content.encodingOptionTemplateIdIntegerEncoding template ID
        content.thumbnailBooleanThumbnail extraction settings
        content.notificationUrlStringCallback URL settings
        content.outputObjectOutput settings
        content.output.bucketNameStringOutput bucket name
        content.output.filePathStringDetailed path to upload the output file
        content.output.thumbnailBucketNameStringThumbnail output bucket name
        content.output.thumbnailFilePathStringThumbnail output file upload detailed path
        content.output.accessControlStringDisclosure scope of the output file
        content.output.thumbnailAccessControlStringDisclosure scope of the output thumbnail
        content.statusStringCategory statusCREATED, DELETED, RUNNING
        content.createTimeIntegerCategory creation time
        content.updateTimeIntegerCategory editing time
        content.disabledBooleanFiled provided to sub accounts
        Resource activation status for the Sub Account
        content.outputTypeIntegerNumber of output types according to the encoding settings
        content.advancedOptionsObjectAdvanced settings
        content.advancedOptions.trimmingObjectOutput file trimming settings
        content.advancedOptions.trimming.startTimeCodeStringTrimming start point
        content.advancedOptions.trimming.endTimeCodeStringTrimming end point
        content.advancedOptions.imageOverlayObjectImage overlay settings
        content.advancedOptions.imageOverlay.inputObjectInput image
        content.advancedOptions.imageOverlay.input.bucketNameStringName of the bucket where the input image has been uploaded
        content.advancedOptions.imageOverlay.input.filePathStringDetailed path of the input image
        content.advancedOptions.imageOverlay.positionObjectLocation settings of image to be inserted
        content.advancedOptions.imageOverlay.position.xIntegerLocation of x-axis
        content.advancedOptions.imageOverlay.position.yIntegerLocation of y-axis
        content.advancedOptions.imageOverlay.sizeObejctSize settings of image to be inserted
        content.advancedOptions.imageOverlay.size.widthIntegerImage width
        content.advancedOptions.imageOverlay.size.heightIntegerImage 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
        }
        HTTP

        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
            ]
          }
        }
        HTTP

        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"
        }
        Plain text

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.