Domains /
Enable CDN on a subdomain
Required permission
Account > Domains > General > Update
Path parameters
domain
string requiredName of the domain
subdomain
string requiredName of the subdomain
Request body
- {object}
provider
string requiredProvider for which a CDN on the subdomain should be enabled.
options
(multiple options: oneOf)- {object}
service
{object}forceTlsEnableHsts
booleanhstsDuration
(multiple options: oneOf)- numbermin300
- numbermin300
staleIfError
booleanstaleIfErrorTtl
numberdefaultTtl
numberlogging
{object}enabled
booleanhttp3
{object}enabled
booleanwebsockets
{object}enabled
booleancompression
{object}enabled
booleanmode
(multiple options: oneOf)- stringone ofgzip, brotli
- stringone ofgzip, brotli
vclSnippets
[array]- {object}
id
stringname
string requiredmin length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$type
string requiredone ofinit, recv, hash, hit, miss, pass, fetch, error, deliver, log, nonedynamic
string requiredone of0, 1priority
number requiredmin0max100content
string requiredcacheSettings
[array]- {object}
id
stringname
string requiredmin length3max length39pattern^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$action
stringone ofpass, cache, restartcacheCondition
stringstaleTtl
number requiredttl
number required- {object}
OR
OR
OR
Response body
- {object}
Response object.
data
{object} requiredResult data.
POST /v1/domains/{domain}/subdomains/{subdomain}/cdn/enable
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"provider":"fastly","options":{"vclSnippets":[null],"cacheSettings":[null]}}' \
https://api.northflank.com/v1/domains/{domain}/subdomains/{subdomain}/cdn/enable
Example response
200 OK
JSON
{
"data": {}
}