Edit channel settings
    • PDF

    Edit channel settings

    • PDF

    Article summary

    Live Station provides an API to edit channel settings.

    Request

    PUT https://livestation.apigw.ntruss.com/api/v2/channels/{channelId}
    

    Request headers

    Header nameRequiredDescription
    x-ncp-apigw-timestampYESIt indicates the elapsed time in milliseconds since January 1, 1970 00:00:00 UTC. 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-keyYESAccess key ID value issued on NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Sub Account Access Key}
    x-ncp-apigw-signature-v2YESSignature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-region_codeYESRegion code (KR)

    Request body

    Field nameRequiredTypeRestrictionsDescription
    channelNameYesStringBetween 3 and 20 characters are allowed
    Special character underscore (_) is allowed
    Name of the channel to create
    envTypeOptionalStringDEV, STAGE, REALSettings for usage classification of the channel to be created
    Set to REAL if not entered
    outputProtocolOptionalStringHLS / HLS,DASH / LL_HLSDefault to HLS if not entered
    No support for switching back and forth between HLS/HLS,DASH and LL_HLS protocols
    useDvrYesBooleantrue, false
    immediateOnAirYesBooleantrue, falseAuto-record option to record at the same time as streaming
    timemachineMinYesIntegerThe unit is minutes and can only be set to 360Options for the Time Machine feature, which lets you rewind video back to the start of recording
    Must be set if useDvr is true
    recordYesObject
    record.formatYesStringMP4,HLS,ALLSpecify the type of recording files that are automatically saved to a bucket
    record.typeYesStringNO_RECORD, AUTO_UPLOAD, MANUAL_UPLOADSpecify the type of saved recording file upload
    Disable recording feature when set to "NO_RECORD"
    record.bucketNameOptionalStringAuto-save feature automatically saves recordings to the entered bucket after the live broadcast ends
    record.filePathOptionalStringAuto-save feature automatically saves recordings to the entered bucket after the live broadcast ends
    filePath must start with "/"
    record.accessControlOptionalStringPRIVATE, PUBLIC_READOption to specify Object Storage bucket disclosure scope when uploading recording files via autosave feature
    Default: PRIVATE

    Response

    Field nameTypeDescriptionRemarks
    channelIdString
    channelNameString
    instanceNoString
    qualitySetIdInteger
    qualitySetNameString
    outputProtocolString
    channelStatusStringCREATING, READY, PUBLISH, DELETED, BLOCK, FORCE_BLOCK, FORCE_DELETED
    isRecordingBoolean
    useDvrBoolean
    immediateOnAirBooleantrue, false
    timemachineMinIntegerUnit: Minute
    uploadPathStringRecording file upload file path when AUTO_UPLOAD is enabled
    recordObject
    record.formatStringMP4, HLS, ALL
    record.typeStringNO_RECORD, AUTO_UPLOAD, MANUAL_UPLOAD
    record.bucketNameString
    record.filePathString
    record.accessControlStringPRIVATE, PUBLIC_READ
    cdnObject
    cdn.cdnTypeStringGLOBAL_CDN, GLOBAL_EDGE
    cdn.instanceNoString0 if NO_CDN
    cdn.profileIdIntegerProfile ID of Global Edge0 if NO_CDN
    cdn.statusNameStringCDN statusRUNNING, PUBLISHING, STOPPING, STOPPED, CREATING, CHANGING, CDN_NOT_FOUND
    cdn.serviceNameStringCDN Service Name"" if NO_CDN
    cdn.cdnDomainStringCDN Domain"" if NO_CDN
    publishUrlString
    globalPublishUrlStringURL for international streaming support
    streamKeyString
    recentPublishStartTimeInteger
    createdTimeInteger
    alertOnBoolean
    alertOptionsObject
    alertOptions.alertChangeStatusBoolean
    alertOptions.alertVodUploadFailBoolean
    alertOptions.alertReStreamFailBoolean
    totalPublishSecondsInteger
    envTypeStringDEV, STAGE, REAL
    callbackEndpointString
    backupStreamKeyStringBackup stream key for streaming redundancy
    isStreamFailOverBooleanWhether to apply streaming redundancytrue, false
    originObjectLive Station origin information for CDN integration
    origin.originDomainStringLive Station origin domain for CDN integration
    origin.originPathStringLive Station origin detailed path for CDN integration
    drmEnabledYnBooleanWhether DRM encryption settings are applied
    drmObjectSet DRM encryption using Live Station
    drm.siteIdStringSite id created with One Click Multi DRM product
    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)

    Examples

    Request example

    PUT /api/v2/channels/ls-20210720153935-PjPQi
    HOST: livestation.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp:1521787414578
    x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
    x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
    x-ncp-region_code:KR
    
    //Request body 
     {
      "channelName": "mychannel2",
      "envType": "DEV",
      "outputProtocol": "HLS",
      "immediateOnAir": false,
      "record": {
        "type": "NO_RECORD"
      },
      "timemachineMin": 360,
      "useDvr": true
    }
    

    Response example

    HTTP/1.1 200 OK
    Server: nginx
    Date: Fri, 26 Sep 2021 09:53:32 GMT
    Content-Type: application/json;charset=utf-8
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
    
    {
      "content": {
        "channelId": "ls-20210720153935-PjPQi",
        "channelName": "mychannel2",
        "instanceNo": 1163899,
        "qualitySetId": 6,
        "qualitySetName": "360p-set",
        "outputProtocol": "HLS,",
        "channelStatus": "READY",
        "isRecording": false,
        "useDVR": true,
        "immediateOnAir": false,
        "timemachineMin": 360,
        "cdn": {
          "instanceNo": "1163900",
          "serviceName": "edge-ls-20230914204831-1BRHO",
          "statusName": "RUNNING",
          "cdnType": "GLOBAL_EDGE",
          "cdnDomain": "mycdn.edge.naverncp.com",
          "profileId": 299,
          "regionType": "KOREA"
        },
        "record": {
          "type": "NO_RECORD"
        },
        "drm": {
          "contentId": "my-first-drm",
          "siteId": "drm-20231120182420-dPTGn"
        },
        "drmEnabledYn": true,
        "publishUrl": "rtmp://live-station-rtmp-url",
        "globalPublishUrl": "rtmp://live-station-global-rtmp-url",
        "streamKey": "jjiantco4psakuwd5526u2glcxrqaar4",
        "totalPublishSeconds": 0,
        "createdTime": 1584931640000,
        "recentPublishStartTime": 0,
        "alertOn": false,
        "alertOptions": {
          "alertChangeStatus": false,
          "alertVodUploadFail": false,
          "alertReStreamFail": false
        },
        "callbackEndpoint": "https://my-callback-endpoint",
        "envType": "REAL",
        "origin": {
          "originDomain": "ls-k1.video.media.ntruss.com",
          "originPath": "1"
        },
        "backupStreamKey": "lbuy4dcrxk2ctxs8uqxanpy833p08vvz?backup=true",
        "isStreamFailOver": true
      }
    }
    

    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.