This is an API to register a callback endpoint that can receive events from Live Station. Callback endpoints can be used by separating callback settings for all channels and callback settings for individual channels.
Callback delivery data
If you register a callback endpoint, the following data is sent to the set endpoint URL whenever an event occurs in Live Station. (Using HTTP POST)
Set up VOD channel-specific callbacks (1 (channel): 1 (callback endpoint))
Callback delivery action by request
Callback endpoint by channel
Global channel callback endpoint
Action
Not set
Not set
No callback sent
Not set
Set
Send to global channel callback endpoint
Set
Not set
Send to callback endpoints set up for specific channels
Set
Set
Send to callback endpoints set up for specific channels
Request headers
Header name
Required
Description
x-ncp-apigw-timestamp
YES
It 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-key
YES
Access key ID value issued on NAVER Cloud Platform portal x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v2
YES
Signature encrypted with the access key ID value and secret key x-ncp-apigw-signature-v2:{API Gateway Signature}
x-ncp-region_code
YES
Region code (KR)
Global channel callback setup request body
Field name
Required
Type
Restrictions
Description
callbackUrl
Yes
String
custom endpoint to receive callbacks
Individual channel callback setup request body
Field name
Required
Type
Restrictions
Description
callbackEndpoint
Yes
String
custom endpoint to receive callbacks
Response
Global channel callback setup response
Field name
Type
Description
Remarks
callbackUrl
String
updateTime
Integer
General channel callback setup response
Field name
Type
Description
Remarks
channelId
String
channelName
String
instanceNo
String
qualitySetId
Integer
qualitySetName
String
outputProtocol
String
Default set: HLS, DASH
channelStatus
String
CREATING, READY, PUBLISH, DELETED,BLOCK
isRecording
Boolean
useDvr
Boolean
immediateOnAir
Boolean
timemachineMin
Integer
Unit: Minute
snapshot
Object
snapshotId
Integer
cdn
Object
cdn.instanceNo
String
0 if NO_CDN
cdn.serviceName
String
CDN Service Name
"" if NO_CDN
cdn.profileId
Integer
Profile ID of Global Edge
0 if NO_CDN
cdn.statusName
String
CDN status
"" if NO_CDN
cdn.cdnType
String
GLOBAL_CDN, GLOBAL_EDGE
cdn.cdnDomain
String
CDN Domain
"" if NO_CDN
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
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
Restream channel callback setup response
Field name
Type
Description
Remarks
channelId
String
channelName
String
instanceNo
Integer
channelStatus
String
createdTime
Integer
publishUrl
String
streamKey
String
planType
String
STANDARD, PROFESSIONAL
restream
Object[]
restream[].targetName
String
restream[].rtmpUrl
String
restream[].streamKey
String
restream[].id
String
Displayed when set
restream[].password
String
Displayed when set
platformCount
Integer
totalPublishSeconds
Integer
recentPublishStartTime
Integer
alertOn
Boolean
alertOptions
Object
alertOptions.alertChangeStatus
Boolean
alertOptions.alertVodUploadFail
Boolean
alertOptions.alertReStreamFail
Boolean
isPublishing
Boolean
envType
String
DEV, STAGE, REAL
callbackEndpoint
String
Examples
Global channel callback setup request example
POST /api/v2/events/callbackEndpoint
HOST:livestation.apigw.ntruss.comContent-Type:application/jsonx-ncp-apigw-timestamp:1521787414578x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgyx-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=x-ncp-region_code:KR{"callbackUrl":"https://my-callback-endpoint"}
General channel-specific callback setup request example
POST /api/v2/channels/{channelId}/callbackEndpoint
HOST:livestation.apigw.ntruss.comContent-Type:application/jsonx-ncp-apigw-timestamp:1521787414578x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgyx-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=x-ncp-region_code:KR{"callbackEndpoint":"https://my-callback-endpoint"}
HTTP
General channel-specific callback setup response example
Restream channel-specific callback setup request example
POST /api/v2/re-stream/channels/{channelId}/callbackEndpoint
HOST:livestation.apigw.ntruss.comContent-Type:application/jsonx-ncp-apigw-timestamp:1521787414578x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgyx-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=x-ncp-region_code:KR{"callbackEndpoint":"https://my-callback-endpoint"}
HTTP
Restream channel-specific callback setup response example