CDN Resources
Name | Method | Path |
---|---|---|
get | /v3/cdn | |
post | /v3/cdn | |
get | /v3/cdn/{id} | |
patch | /v3/cdn/{id} | |
delete | /v3/cdn/{id} | |
get | /v3/cdn/{id}/cname | |
post | /v3/cdn/{id}/cname | |
put | /v3/cdn/{id}/datacenters | |
get | /v3/cdn/{id}/datacenters |
List of CDN Resources
gethttps://api.cdn77.com/v3/cdn
Responses
// response
[
{
"id": 1234567890,
"cnames": [
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"cname": "cname.your-domain.com"
}
],
"creation_time": "2023-09-27T09:30:04.723Z",
"label": "My cdn",
"note": "Note for my CDN",
"origin_id": "e56564d1-8d3e-4457-93a6-082b054bc736",
"origin_protection": {
"enabled": true
},
"url": "1234567890.rsc.cdn77.org",
"cache": {
"max_age": 1440,
"max_age_404": 1,
"requests_with_cookies_enabled": true
},
"secure_token": {
"token": "T9WQQX4SV5",
"type": "parameter"
},
"query_string": {
"parameters": [
"utm"
],
"ignore_type": "all"
},
"headers": {
"cors_enabled": true,
"cors_timing_enabled": true,
"cors_wildcard_enabled": true,
"host_header_forwarding_enabled": true
},
"https_redirect": {
"code": 301,
"enabled": true
},
"mp4_pseudo_streaming": {
"enabled": true
},
"quic": {
"enabled": true
},
"waf": {
"enabled": true
},
"ssl": {
"type": "SNI",
"ssl_id": "9880280c-0507-46d1-88f3-71cfee83fa57"
},
"stream": {
"origin_url": "prg-1.s.cdn77.com",
"password": "P4ssw0rd123456",
"query_key": "123456789",
"protocol": "rtmp",
"port": 1936,
"path": "static"
},
"hotlink_protection": {
"domains": [
"some-domain.com"
],
"type": "passlist",
"empty_referer_denied": true
},
"ip_protection": {
"ips": [
"8.8.8.8"
],
"type": "passlist"
},
"geo_protection": {
"countries": [
"UK"
],
"type": "passlist"
}
}
]
Add CDN Resource
posthttps://api.cdn77.com/v3/cdn
Request bodyrequired
// request body
{
"cnames": [
"cname.your-domain.com"
],
"label": "My cdn",
"note": "Note for my CDN",
"origin_id": "e56564d1-8d3e-4457-93a6-082b054bc736"
}
All CNAMEs should be mapped via DNS to CDN URL. Otherwise it's not possible to generate SSL certificate. Maximum number of CNAMEs is "10". To add more, contact our support.
The label helps you to identify your CDN Resource.
Optional note for the CDN Resource.
ID of attached Origin (content source for CDN Resource). More information in our Origin API documentation.
Responses
// response
{
"id": 1234567890,
"cnames": [
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"cname": "cname.your-domain.com"
}
],
"creation_time": "2023-09-27T09:30:04.725Z",
"label": "My cdn",
"note": "Note for my CDN",
"origin_id": "e56564d1-8d3e-4457-93a6-082b054bc736",
"origin_protection": {
"enabled": true
},
"url": "1234567890.rsc.cdn77.org",
"cache": {
"max_age": 1440,
"max_age_404": 1,
"requests_with_cookies_enabled": true
},
"secure_token": {
"token": "T9WQQX4SV5",
"type": "parameter"
},
"query_string": {
"parameters": [
"utm"
],
"ignore_type": "all"
},
"headers": {
"cors_enabled": true,
"cors_timing_enabled": true,
"cors_wildcard_enabled": true,
"host_header_forwarding_enabled": true
},
"https_redirect": {
"code": 301,
"enabled": true
},
"mp4_pseudo_streaming": {
"enabled": true
},
"quic": {
"enabled": true
},
"waf": {
"enabled": true
},
"ssl": {
"type": "SNI",
"ssl_id": "9880280c-0507-46d1-88f3-71cfee83fa57"
},
"stream": {
"origin_url": "prg-1.s.cdn77.com",
"password": "P4ssw0rd123456",
"query_key": "123456789",
"protocol": "rtmp",
"port": 1936,
"path": "static"
},
"hotlink_protection": {
"domains": [
"some-domain.com"
],
"type": "passlist",
"empty_referer_denied": true
},
"ip_protection": {
"ips": [
"8.8.8.8"
],
"type": "passlist"
},
"geo_protection": {
"countries": [
"UK"
],
"type": "passlist"
}
}
Detail of CDN Resource
gethttps://api.cdn77.com/v3/cdn/{id}
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Responses
// response
{
"id": 1234567890,
"cnames": [
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"cname": "cname.your-domain.com"
}
],
"creation_time": "2023-09-27T09:30:04.725Z",
"label": "My cdn",
"note": "Note for my CDN",
"origin_id": "e56564d1-8d3e-4457-93a6-082b054bc736",
"origin_protection": {
"enabled": true
},
"url": "1234567890.rsc.cdn77.org",
"cache": {
"max_age": 1440,
"max_age_404": 1,
"requests_with_cookies_enabled": true
},
"secure_token": {
"token": "T9WQQX4SV5",
"type": "parameter"
},
"query_string": {
"parameters": [
"utm"
],
"ignore_type": "all"
},
"headers": {
"cors_enabled": true,
"cors_timing_enabled": true,
"cors_wildcard_enabled": true,
"host_header_forwarding_enabled": true
},
"https_redirect": {
"code": 301,
"enabled": true
},
"mp4_pseudo_streaming": {
"enabled": true
},
"quic": {
"enabled": true
},
"waf": {
"enabled": true
},
"ssl": {
"type": "SNI",
"ssl_id": "9880280c-0507-46d1-88f3-71cfee83fa57"
},
"stream": {
"origin_url": "prg-1.s.cdn77.com",
"password": "P4ssw0rd123456",
"query_key": "123456789",
"protocol": "rtmp",
"port": 1936,
"path": "static"
},
"hotlink_protection": {
"domains": [
"some-domain.com"
],
"type": "passlist",
"empty_referer_denied": true
},
"ip_protection": {
"ips": [
"8.8.8.8"
],
"type": "passlist"
},
"geo_protection": {
"countries": [
"UK"
],
"type": "passlist"
}
}
Edit CDN Resource
patchhttps://api.cdn77.com/v3/cdn/{id}
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Request bodyrequired
// request body
{
"cache": {
"max_age": 1440,
"max_age_404": 1,
"requests_with_cookies_enabled": true
},
"cnames": [
"cname.your-domain.com"
],
"geo_protection": {
"countries": [
"UK"
],
"type": "passlist"
},
"headers": {
"cors_enabled": true,
"cors_timing_enabled": true,
"cors_wildcard_enabled": true,
"host_header_forwarding_enabled": true
},
"hotlink_protection": {
"domains": [
"some-domain.com"
],
"type": "passlist",
"empty_referer_denied": true
},
"https_redirect": {
"code": 301,
"enabled": true
},
"ip_protection": {
"ips": [
"8.8.8.8"
],
"type": "passlist"
},
"label": "My cdn",
"note": "Note for my CDN",
"mp4_pseudo_streaming": {
"enabled": true
},
"origin_id": "e56564d1-8d3e-4457-93a6-082b054bc736",
"query_string": {
"parameters": [
"utm"
],
"ignore_type": "all"
},
"quic": {
"enabled": true
},
"secure_token": {
"token": "T9WQQX4SV5",
"type": "parameter"
},
"ssl": {
"type": "SNI",
"ssl_id": "9880280c-0507-46d1-88f3-71cfee83fa57"
},
"waf": {
"enabled": true
}
}
Your files will remain cached for the specified duration, after which your origin will be checked for an updated version of your files. Expiry/cache-control headers override this setting.
All CNAMEs should be mapped via DNS to CDN URL. Otherwise it's not possible to generate SSL certificate.Maximum number of CNAMEs is "10". To add more, contact our support.
Geo protection enables you to control which countries can access your content directly.
Hotlink protection enables you to control which hostnames/domains can link to and access your content directly.
If enabled, all requests via HTTP are redirected to HTTPS. Verify HTTPS availability of CNAMEs before activating, if applicable.
IP protection enables you to control which networks can access your content directly.
The label helps you to identify your CDN Resource.
Optional note for the CDN Resource.
Turn this option on if using a flash-based video player with MP4 files. Pseudo-streaming is used mainly in flash players. HTML5 players use range-requests. When enabled the "query_string" option must be set to ignore all parameters.
ID of attached Origin (content source for CDN Resource). More information in our Origin API documentation.
Enabling this feature will ignore the query string, allowing URLs with query strings to cache properly. This is particularly useful if you tag your URLs with tracking/marketing parameters, for example.
gQUIC is a protocol created by Google. It works with chromium-based browsers and was originally designed for the transmission of HTTP/2 frames. It incentivised a new standardised transport protocol called QUIC.
This feature allows you to serve your content using signed URLs. You can enable your users to download secured content from the CDN Resource with a valid hash. Note: When you check this option, make sure to generate secured links to access your content. Maximum length is 50 characters.
Protect your website against XSS, SQL injection and more with our SmartWAF. We're using OWASP Core Rule Set (CRS) to protect your data against the most exploited vulnerabilities.
Responses
Delete CDN Resource
deletehttps://api.cdn77.com/v3/cdn/{id}
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Responses
List of CNAMEs
gethttps://api.cdn77.com/v3/cdn/{id}/cname
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Responses
// response
[
{
"id": "9880280c-0507-46d1-88f3-71cfee83fa57",
"cname": "cname.your-domain.com"
}
]
Add CNAME
posthttps://api.cdn77.com/v3/cdn/{id}/cname
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Request bodyrequired
// request body
{
"cname": "test.cname.com"
}
CNAME should be mapped via DNS to CDN URL. Otherwise it's not possible to generate SSL certificate for any CNAME assigned to CDN Resource.
Responses
Enable data centers
puthttps://api.cdn77.com/v3/cdn/{id}/datacenters
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Request bodyrequired
// request body
[
"65b63934-2278-40aa-affa-f4c0d1e7c029"
]
Responses
List of data centers
gethttps://api.cdn77.com/v3/cdn/{id}/datacenters
Request parameters
ID of the CDN Resource. This is also used as the CDN Resource URL.
Responses
// response
[
{
"location_id": "ee0746a8-a296-4e56-8d91-63b1cd475b40",
"city": "Los Angeles",
"continent_code": "EU",
"country": "Germany",
"is_enabled": true,
"latitude": 48.5833,
"longitude": 7.75
}
]