Available in Classic and VPC
Register default callback endpoint that will receive event notifications for all channels.
Callback delivery data
When you register a callback endpoint, data is sent to the specified endpoint URL whenever an event occurs. It uses the HTTP POST method for sending data. The following describes the delivery data.
Field | Type | Required | Description |
---|---|---|---|
id |
Integer | Required | Event identifier |
logLevel |
String | Required | Log level |
channelId |
String | Required | Channel ID |
event |
String | Required | Event code |
timestamp |
Integer | Required | Event occurrence date and time (millisecond)
|
An example of delivery data is as follows:
{
"id": 1234,
"logLevel": "INFO",
"channelId": "ls-20200327******-aBCD3",
"event": "STREAM_UPDATE",
"timestamp": 1599218791425
}
Callback delivery behavior is determined as follows:
- When callback endpoint by channel is registered: Send to that channel callback endpoint.
- When only default callback endpoint is registered: Send to the default callback endpoint.
- When both default and per-channel endpoints are not registered: No delivery
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
POST | /api/v2/events/callbackEndpoint |
Request headers
For information about the headers common to all Live Station APIs, see Live Station request headers.
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
callbackUrl |
String | Required | Callback endpoint URL |
Request example
The request example is as follows:
curl --location --request POST 'https://livestation.apigw.ntruss.com/api/v2/events/callbackEndpoint' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-region_code: KR' \
--header 'Content-Type: application/json' \
--data '{
"callbackUrl": "https://www.callback-endpoint.com"
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
content |
Object | - | Response result |
content.callbackUrl |
String | - | Callback endpoint URL |
content.updateTime |
Integer | - | Update date and time (millisecond)
|
Response status codes
For information about the HTTP status codes common to all Live Station APIs, see Live Station response status codes.
Response example
The response example is as follows:
{
"content": {
"callbackUrl": "https://www.callback-endpoint.com",
"updateTime": 1755750398046
}
}