Skip to content

Create CDN distribution

POST
/api/v1/cdn/distributions/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/cdn/distributions/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"source": "cdn",
"domain_name": "e2enetworks.com",
"origin_details": {
"origin_path": "/static",
"origin_id": "e2enetworks.com",
"ssl_protocol": "TLSv1.2",
"protocol_policy": "https-only",
"response_timeout": 30,
"keepalive_timeout": 5
},
"cache_details": {
"viewer_protocol_policy": "https-only",
"allowed_http_methods": "GET|HEAD",
"min_ttl": 0,
"max_ttl": 3153000,
"default_ttl": 86400
},
"domain_details": {
"http_versions": "http2",
"root_object": "",
"is_ipv6_supported": false
}
}'
project_id
required
integer
location
required
string
Allowed values: Delhi Chennai

Deployment region for the resource. Accepted values: Delhi, Chennai.

Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.

Media typeapplication/json
object
source
string

Example

cdn
domain_name
string

Example

e2enetworks.com
origin_details
object
origin_path
string

Example

/static
origin_id
string

Example

e2enetworks.com
ssl_protocol
string

Example

TLSv1.2
protocol_policy
string

Example

https-only
response_timeout
integer

Example

30
keepalive_timeout
integer

Example

5
cache_details
object
viewer_protocol_policy
string

Example

https-only
allowed_http_methods
string

Example

GET|HEAD
min_ttl
integer

Example

0
max_ttl
integer

Example

3153000
default_ttl
integer

Example

86400
domain_details
object
http_versions
string

Example

http2
root_object
string

Example

is_ipv6_supported
boolean

Example

false

Distribution creation successful.

Media typeapplication/json
object
code
integer
data
object
message
string
domain_id
string
response_domain
string
resource_type
string
nullable
label_id
string
nullable
errors
object
key
additional properties
string
message
string

Example

{
"code": 200,
"data": {
"message": "Your Distribution has been created successfully. It will take upto 30 minutes to deploy. Please wait.",
"domain_id": "ENZYVCZPO9X4L",
"response_domain": "docs1g047zlrhx.cdn.e2enetworks.net",
"resource_type": null,
"label_id": null
},
"errors": {},
"message": "Success"
}