Channel setting change
  • PDF

Channel setting change

  • PDF

Live Station provides APIs to modify channel settings.

request

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

request header

| header name | Required | Description |
| :----------------------: | :------: | :------------------------------------------------- ---------- |
| x-ncp-apigw-timestamp | YES | The elapsed time in milliseconds since January 1, 1970 00:00:00 Coordinated Universal Time (UTC). If the time difference from the API Gateway server is more than 5 minutes, the request is considered invalid**
x-ncp-apigw-timestamp:{Timestamp} |
| x-ncp-iam-access-key | YES | Access Key ID value issued from NAVER CLOUD PLATFORM Portal
x-ncp-iam-access-key:{Sub Account Access Key} |
| x-ncp-apigw-signature-v2 | YES | Signature encrypted with Access Key ID value and Secret Key
x-ncp-apigw-signature-v2:{API Gateway Signature} |
| x-ncp-region_code | YES | Region Code (KR) |

request body

field name Required type Restrictions Description
channelName Yes String You can enter at least 3 characters and up to 20 characters
Special character “_” allowed
The name of the channel to be created
envType Optional String DEV, STAGE, REAL Setting to distinguish the use of the channel to be created
If not input, it is set to REAL
outputProtocol Optional String HLS / HLS,DASH Output protocol setting
If not entered, it is set to HLS
useDvr Yes Boolean true, false
immediateOnAir Yes Boolean true, false Auto-recording option to start recording at the same time as transmission
timemachineMin Yes Integer The unit is minutes and can only be set to 360 Option related to the time machine function that allows you to look back at the video up to the start point of recording
Must be set when useDvr is true
snapshot Object
snapshotId Integer
record Yes Object
record.format Yes String MP4, HLS, ALL Specifies the type of recording file that is automatically saved to a bucket
record.type Yes String NO_RECORD, AUTO_UPLOAD, MANUAL_UPLOAD When the upload type of the saved recording file is set to "NO_RECORD", the recording function cannot be used
record.bucketName Optional String The recorded file is automatically saved in the entered bucket after the live broadcast is finished through the auto-save function
record.filePath Optional String The recorded file is automatically saved in the specified filePath after the live broadcast is finished through the auto-save function
filePath must start with “/”
record.accessControl Optional String PRIVATE, PUBLIC_READ Option to designate the object storage bucket public range when uploading recorded files through the auto-save function
Default: PRIVATE

reply

field name type Description Remarks
channelId String
channelName String
instanceNo String
qualitySetId Integer
qualitySetName String
outputProtocol String Default set: HLS
channelStatus String CREATING, READY, PUBLISH, DELETED, BLOCK
isRecording Boolean
useDvr Boolean
immediateOnAir Boolean true, false
timemachineMin Integer Units: Minutes
uploadPath String Recording file upload path when AUTO_UPLOAD option is set
record Object
record.format String MP4, HLS, ALL
record.type String NO_RECORD, AUTO_UPLOAD, MANUAL_UPLOAD
record.bucketName String
record.filePath String
record.accessControl String PRIVATE, PUBLIC_READ
cdn Object
cdn.instanceNo String 0 for NO_CDN
cdn.serviceName String CDN Service Name If NO_CDN, ""
cdn.statusName String CDN Status If NO_CDN, ""
cdn.cdnType String CDN_PLUS, GLOBAL_CDN
cdn.cdnDomain String CDN Domain If NO_CDN, ""
publishUrl String
streamKey String
recentPublishStartTime Integer
createdTime Integer
alertOn Boolean if alertOn == true, alertOptions should be set
alertOptions Object
alertOptions.alertChangeStatus Boolean
alertOptions.alertVodUploadFail Boolean
alertOptions.alertReStreamFail Boolean
totalPublishSeconds Integer
envType String DEV, STAGE, REAL
callbackEndpoint String

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" : "cdn-ls-20200323114720-bMoDF",
            "statusName" : "running",
            "cdnType" : "CDN_PLUS",
            "cdnDomain" : "mycdn.cdn.ntruss.com"
        },
       "record": {
             "type": "NO_RECORD"
        },
        "publishUrl": "rtmp://live-station-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"
    }
}

Was this article helpful?