MENU
      Change channel CDN
        • PDF

        Change channel CDN

        • PDF

        Article summary

        VOD Station provides APIs for changing the CDN integrated with a channel, and provides Get channel list API and Get channel information API for querying channels whose CDN changed.

        Note

        The following are precautions when changing CDNs integrated with a VOD Station channel.

        • The CDN integrated with a VOD Station channel must be CDN+.
        • The VOD Station channel must be stopped before changing.

        Request

        POST https://vodstation.apigw.ntruss.com/api/v2/channels/{channelId}/cdn-to-edge
        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, and the request is considered invalid if the timestamp differs from the current time by more than 5 minutes
        x-ncp-apigw-timestamp:{Timestamp}
        x-ncp-iam-access-keyValue of access key ID issued in 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

        Field nameRequiredTypeRestrictionsDefault valueDescription
        cdnYObject
        cdn.profileIdYIntegerProfile ID to create the Global Edge from
        cdn.regionTypeYStringKOREA, JAPAN, GLOBALGlobal Edge service region

        Response

        Field nameTypeDescriptionNote
        contentObjectVOD Station open API response object
        content.idStringID of the created channel
        content.nameStringChannel name
        content.channelStatusStringChannel's current statusCREATING, READY, STOPPING, STOPPED, TERMINATING, TERMINATED, FORCE_STOPPING, FORCE_STOPPED, FORCETERMINATING, FORCETERMINATED
        content.storageBucketNameStringName of the Object Storage bucket linked with the channel
        content.encryptedBucketNameStringEncrypted name of the Object Storage bucket integrated with the channel, used when creating the playback URL
        content.accessPrivateFilesBooleanSet access restrictions in VOD Station for private files in the bucket
        content.segmentDurationIntegerSegment duration of the channel (second)
        content.segmentDurationOptionStringChannel's segment keyframe sorting options
        content.protocolList[]Array(String)List of streaming protocols of the channel
        content.createTimeIntegerThe time channel creation started
        content.readyTimeIntegerThe time channel creation completed
        content.cdnCreatedTimeIntegerThe time when the CDN was automatically created in linkage to the channel
        content.playUrlStringCDN-based playback URL template
        content.cdnStatusStringStatus of the CDN integrated with the channel
        If not auto-generated, displayed as NOT_FOUND
        content.cdnDomainStringAuto-generated Global Edge's domain
        content.cdnServiceNameStringAuto-generated Global Edge's service name
        content.cdnObjectAuto-generated Global Edge information
        content.cdn.cdnTypeStringAuto-generated CDN type
        content.cdn.cdnDomainStringAuto-generated Global Edge's domain
        content.cdn.cdnServiceNameStringAuto-generated Global Edge's service name
        content.cdn.profileIdIntegerAuto-generated Global Edge's profile ID
        content.cdn.regionTypeStringAuto-generated Global Edge's service area
        content.cdn.cdnInstanceNoIntegerAuto-generated Global Edge's instance information
        content.storageBucketStatusStringStatus of the Object Storage bucket integrated with the channel
        content.originPathStringSource path of the created channel. This is referred to when an independent CDN is created.
        content.encryptionList[]ArrayMedia security settings of the channel
        content.encryptionList[].protocolStringMedia security target protocol
        content.encryptionList[].mediaEncryptionTypeCodeIntegerMedia security setting's encryption type
        1: AES-128
        2: Sample-AES
        3: CENC
        content.encryptionList[].drmTypeCodeIntengerMedia security setting's DRM type
        21: FairPlay
        22: Widevine/PlayReady
        content.encryptionList[].drmTypeNameStringName of the media security setting's DRM type
        content.encryptionList[].drmContentIdStringContent ID to be requested when packaging from VOD Station
        content.encryptionList[].systemIdListArray(String)DRM system ID to be requested when packaging from VOD Station
        content.encryptionList[].drmKeyUrlStringDRM CPIX API URL to be requested when packaging from VOD Station
        content.drmObjectDRM encryption settings using VOD Station
        content.drm.siteIdStringSite ID created with One Click Multi DRM product
        content.drm.contentIdStringUnique ID of the content to apply DRM encryption to
        It is used for DRM packaging and can be at least 3 characters and up to 100 characters, including English letter, numbers, "-" (hyphen), and "_" (underscore)
        errorObjectError response code and message
        error.errorCodeStringError response code
        error.messageStringError response message
        error.detailsStringDetailed description of the error message
        It responds when an API Gateway error occurs

        Examples

        Request example

        POST https://vodstation.apigw.ntruss.com/api/v2/channels/vs-20230512150720-eP0FLuw/cdn-to-edge
        
        POST /api/v2/channels/vs-20230512150720-eP0FLuw/cdn-to-edge
        HOST: vodstation.apigw.ntruss.com
        Content-Type: application/json
        x-ncp-region_code:KR
        x-ncp-apigw-timestamp:1736320666848
        x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
        x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
        
        {
          "cdn": {
            "profileId": 1000,
            "regionType": "KOREA"
          }
        }
        HTTP

        Response example

        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": "vs-20230512150720-eP0FLuw",
            "name": "tl-0512-01",
            "channelStatus": "STOPPED",
            "storageBucketName": "vodstaton-test",
            "segmentDuration": 5,
            "protocolList": [
              "HLS"
            ],
            "createTime": 1683871640,
            "readyTime": 1684479600,
            "cdnCreatedTime": 1736320668,
            "stopTime": 1736246290,
            "playUrl": "https://zyllmlon4911.beta-edge.naverncp.com/[protocol]/[Object Storage Bucket(encryption name)]/[path]/[video filename]/[manifest]",
            "cdnStatus": "CREATING",
            "cdnDomain": "zyllmlon4911.beta-edge.naverncp.com",
            "cdnServiceName": "edge-vs-20230512150720-eP0FLuw",
            "storageBucketStatus": "RUNNING",
            "originPath": "beta-vs2-k1.video.media.ntruss.com/86/vs-20230512150720-eP0FLuw",
            "encryptList": [],
            "accessPrivateFiles": false,
            "encryptedBucketName": "Tpfqek5QfUnLdQt8mGokUQ__",
            "segmentDurationOption": "BASIC",
            "cdn": {
              "cdnType": "GLOBAL_EDGE",
              "cdnDomain": "zyllmlon4911.beta-edge.naverncp.com",
              "cdnServiceName": "edge-vs-20230512150720-eP0FLuw",
              "profileId": 1008,
              "regionType": "KOREA",
              "cdnInstanceNo": 4911
            }
          }
        }
        HTTP

        Was this article helpful?

        What's Next
        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.