Step-by-step guide to provisioning a Livestream CDN distribution through the VNG Cloud CDN API, with instructions on locating the required liveEntrypointId.
Step 1: Create a live entrypoint through the VNG Cloud portal. This step must be performed on the portal — creating a live entrypoint via API is not currently supported.
Step 2: After the live entrypoint is created, open it in edit mode from the portal. The liveEntrypointId is exposed as a UUID segment directly in the browser's URL bar on the edit page, as shown in the screenshots below.
liveEntrypointId in the API request body in the next step.Step 3: Execute the following curl command to create the Livestream CDN distribution. Before running, replace every placeholder (marked with < >) with your actual values.
▸ <YOUR_BEARER_TOKEN>: Your API key token, obtainable from the VNG Cloud portal under API credentials.
▸ <YOUR_LIVE_ENTRYPOINT_ID>: The UUID retrieved in Step 2.
▸ <YOUR_DOMAIN>: The custom domain name to associate with this CDN distribution (e.g., example.com).
curl --location --request POST 'https://vcdn-api.vngcloud.vn/vcdn-api/v1/liv/cdn/create' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <YOUR_BEARER_TOKEN>' \
--data-raw '{
"typeOrigin": "http",
"useSsl": false,
"corsConfiguration": {
"configType": "simple",
"allowOrigin": [],
"allowHeader": [],
"allowMethod": [],
"exposeHeader": [],
"allowCredentials": false
},
"accessFilters": [],
"serviceType": "cdnpack",
"segmentSize": 4,
"channels": [
"*"
],
"liveEntrypointId": "<YOUR_LIVE_ENTRYPOINT_ID>",
"cdnId": "",
"cdnDomain": "",
"domainName": "<YOUR_DOMAIN>",
"checkCustomHeader": false,
"originHostHeader": "",
"sslId": "default",
"cName": null,
"status": 1,
"lbType": "rr",
"failOverErrorCode": [
"500",
"502",
"503",
"504"
],
"upstreams": [],
"minimumTls": "TLS 1.2",
"cacheLevel": "2",
"childrenRule": [],
"childrenAdvanceRuleStr": "",
"childrenAdvanceRule": {
"id": "",
"children": [],
"behaviors": [],
"criteria": [],
"criteriaMustSatisfy": "all",
"options": {},
"variables": [],
"comments": ""
},
"defaultRuleAction": [
{
"id": "",
"actionName": "minimumTls",
"value": "TLS 1.2",
"order": 0,
"status": 1
},
{
"id": "",
"actionName": "cacheLevel",
"value": "2",
"order": 0,
"status": 1
},
{
"actionName": "addCors",
"value": {
"configType": "simple",
"allowOrigin": [],
"allowHeader": [],
"allowMethod": [],
"exposeHeader": [],
"allowCredentials": false
},
"order": 0,
"status": 1
}
]
}'
defaultRuleAction array pre-configures TLS 1.2 as the minimum protocol version, sets cache level to 2, and applies a simple CORS policy. Adjust these values if your distribution requires stricter security or custom caching behavior.