curl --request POST \
--url https://api.bunny.net/mc/apps/{appId}/containers/{containerId}/endpoints \
--header 'AccessKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"cdn": {
"isSslEnabled": true,
"stickySessions": {
"sessionHeaders": [
"<string>"
],
"enabled": true,
"cookieName": "<string>"
},
"pullZoneId": 123,
"portMappings": [
{
"containerPort": 32768,
"exposedPort": 32768,
"protocols": [
"Tcp"
]
}
]
},
"anycast": {
"type": "IPv4",
"portMappings": [
{
"containerPort": 32768,
"exposedPort": 32768,
"protocols": [
"Tcp"
]
}
]
}
}
'{
"id": "<string>"
}Add CDN or Anycast endpoint to a container of given application.
curl --request POST \
--url https://api.bunny.net/mc/apps/{appId}/containers/{containerId}/endpoints \
--header 'AccessKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"cdn": {
"isSslEnabled": true,
"stickySessions": {
"sessionHeaders": [
"<string>"
],
"enabled": true,
"cookieName": "<string>"
},
"pullZoneId": 123,
"portMappings": [
{
"containerPort": 32768,
"exposedPort": 32768,
"protocols": [
"Tcp"
]
}
]
},
"anycast": {
"type": "IPv4",
"portMappings": [
{
"containerPort": 32768,
"exposedPort": 32768,
"protocols": [
"Tcp"
]
}
]
}
}
'{
"id": "<string>"
}Please enter a valid personal API key.
The ID of the application
The ID of the container template
The endpoint configuration
Endpoint was successfully created.
Was this page helpful?