API documentation

CDN Resources

Create, manage and administer your HTTP CDN Resources.

Available methods

Create
Details
Edit
Delete
List

Create

POST
https://api.cdn77.com/v2.0/cdn-resource/create
Create a HTTP CDN resource. Keep in mind that except parameters below marked as required either storage_id or origin_url has to be set.

Object in standard response: cdnResource

Parameters

Parameter Example Description
Parameter: login string* Example: info@domain.com Your login (email) to CDN77 control panel
Parameter: passwd string* Example: 8vL4BpXbRqgPTKA0h Your API password.
Parameter: label string* Example: myLabel Your own label of a CDN Resource.
Parameter: type string* Example: standard Valid values: 'standard' | 'video'
Parameter: origin_scheme string Example: https URL scheme of the Origin. Valid values: 'http' | 'https'
Parameter: origin_url string Example: www.domain.ltd URL of your content source (Origin). Doesn't have to be set when CDN Storage Id is set (that means instead of using your own URL you use our CDN Storage).
Parameter: origin_port int Example: You can specify port through which we will access your origin.
Parameter: storage_id int Example: Storage Id. See available Storages and their Id in the list of storages. Set to 0 if you want to disable CDN Storage. Ignore query string (qs_status) is set to 1 when you enable CDN Storage as Origin.
Parameter: cname string Example: cdn.domain.ltd Domain name that will redirect to our CDN server.
Parameter: other_cnames array Example: ["cdn1.domain.ltd", "cdn2.domain.ltd", "cdn3.domain.ltd"] Array. Maximum length of array is 9.
Parameter: cache_expiry int Example: 10 In minutes. Valid values: '10' | '10800' | '11520' | '12960' | '1440' | '14440' | '15840' | '17280' | '2160' | '240' | '2880' | '30' | '4320' | '5760' | '60' | '720' | '7200' | '8640'
Parameter: qs_status int Example: 0 By default the entire URL is treated as a separate cacheable item. If you want to override this, set qs_status to '1', otherwise to '0'. If you have CDN Storage set as Origin, qs_status is automatically set to 1. Valid values: '0' | '1'
Parameter: setcookie_status int Example: 0 To cache Set-Cookies responses, set this to '1' (disabled by default). Valid values: '0' | '1'
Parameter: mp4_pseudo_on int Example: 0 Allow streaming video in mp4 format. For video, a CDN Resource is automatically enabled. Valid values: '0' | '1'
Parameter: gp_type string Example: blacklist Sets geo protection type. Valid values: 'blacklist' | 'whitelist'
Parameter: gp_countries array Example: ["FR", "GB", "US"] Sets geo protection list of whitelisted/blacklisted countries, enter the country's 2 character ISO code.
Parameter: ipp_type string Example: blacklist Sets IP protection type. Valid values: 'blacklist' | 'whitelist'
Parameter: ipp_addresses array Example: ["192.168.25.0/24", “72.53.0.0/16"] Sets IP protection list of whitelisted/blacklisted addresses. Accepts CIDR notation only.
Parameter: url_signing_on int Example: 0 Allow generating of secured links with expiration time. Content is not available without valid token. Valid values: '0' | '1'
Parameter: url_signing_type string Example: parameter Sets secure token type Valid values: 'parameter' | 'path'
Parameter: url_signing_key string Example: Key (hash) for signing URLs.
* Parameter required.

Return Values

Return Value Description
id Your CDN Id. See how to retrieve a list of your cdns including their ids.
type Valid values: 'standard' | 'video'
origin_scheme URL scheme of the Origin. Valid values: 'http' | 'https'
origin_url URL of your content source (Origin). Doesn't have to be set when CDN Storage Id is set (that means instead of using your own URL you use our CDN Storage).
label Your own label of a CDN Resource.
storage_id Storage Id. See available Storages and their Id in the list of storages. Set to 0 if you want to disable CDN Storage. Ignore query string (qs_status) is set to 1 when you enable CDN Storage as Origin.
cname Domain name that will redirect to our CDN server.
cache_expiry In minutes. Valid values: '10' | '10800' | '11520' | '12960' | '1440' | '14440' | '15840' | '17280' | '2160' | '240' | '2880' | '30' | '4320' | '5760' | '60' | '720' | '7200' | '8640'
url_signing_on Allow generating of secured links with expiration time. Content is not available without valid token. Valid values: '0' | '1'
url_signing_key Key (hash) for signing URLs.
qs_status By default the entire URL is treated as a separate cacheable item. If you want to override this, set qs_status to '1', otherwise to '0'. If you have CDN Storage set as Origin, qs_status is automatically set to 1. Valid values: '0' | '1'
setcookie_status To cache Set-Cookies responses, set this to '1' (disabled by default). Valid values: '0' | '1'
other_cnames Array. Maximum length of array is 9.
instant_ssl Set to 1 if you want to have a SSL certificate for every CNAME for free.
mp4_pseudo_on Allow streaming video in mp4 format. For video, a CDN Resource is automatically enabled. Valid values: '0' | '1'

Examples

                                
                                                                            
# POST request
curl --data "login=name@domain.com&passwd=your_api_password&label=yourLabel&type=standard&origin_url=yourdomain.com&cname=cdn.yourdomain.com&instant_ssl=1&cache_expiry=17280&qs_status=0&setcookie_status=0&url_signing_on=0" https://api.cdn77.com/v2.0/cdn-resource/create # response {"status":"ok","description":"Request was successful.","cdnResource": {"id":xxx,"origin_scheme":"http","origin_url":"yourdomain.com","cname":"cdn.yourdomain.com","cdn_url":"xxx.rsc.cdn77.org","cache_expiry":17280,"url_signing_on":0,"qs_status":0,"setcookie_status":0,"other_cnames":[],"label":"yourLabel","storage_id":null,}}

Details

GET
https://api.cdn77.com/v2.0/cdn-resource/details
Get your http CDN resource details.

Object in standard response: cdnResource

Parameters

Parameter Example Description
Parameter: login string* Example: info@domain.com Your login (email) to CDN77 control panel
Parameter: passwd string* Example: 8vL4BpXbRqgPTKA0h Your API password.
Parameter: id int* Example: Your CDN Id. See how to retrieve a list of your cdns including their ids.
* Parameter required.

Return Values

Return Value Description
gp_type Sets geo protection type. Valid values: 'blacklist' | 'whitelist'
label Your own label of a CDN Resource.
ipp_type Sets IP protection type. Valid values: 'blacklist' | 'whitelist'
instant_ssl Set to 1 if you want to have a SSL certificate for every CNAME for free.
ipp_addresses Sets IP protection list of whitelisted/blacklisted addresses. Accepts CIDR notation only.
gp_countries Sets geo protection list of whitelisted/blacklisted countries, enter the country's 2 character ISO code.
id Your CDN Id. See how to retrieve a list of your cdns including their ids.
platform Check more about our new NeXt Generation platform. Valid values: 'nxg' | 'old'
type Valid values: 'standard' | 'video'
origin_url URL of your content source (Origin). Doesn't have to be set when CDN Storage Id is set (that means instead of using your own URL you use our CDN Storage).
storage_id Storage Id. See available Storages and their Id in the list of storages. Set to 0 if you want to disable CDN Storage. Ignore query string (qs_status) is set to 1 when you enable CDN Storage as Origin.
cname Domain name that will redirect to our CDN server.
cdn_url
cache_expiry In minutes. Valid values: '10' | '10800' | '11520' | '12960' | '1440' | '14440' | '15840' | '17280' | '2160' | '240' | '2880' | '30' | '4320' | '5760' | '60' | '720' | '7200' | '8640'
url_signing_on Allow generating of secured links with expiration time. Content is not available without valid token. Valid values: '0' | '1'
url_signing_key Key (hash) for signing URLs.
qs_status By default the entire URL is treated as a separate cacheable item. If you want to override this, set qs_status to '1', otherwise to '0'. If you have CDN Storage set as Origin, qs_status is automatically set to 1. Valid values: '0' | '1'
setcookie_status To cache Set-Cookies responses, set this to '1' (disabled by default). Valid values: '0' | '1'
other_cnames Array. Maximum length of array is 9.
mp4_pseudo_on Allow streaming video in mp4 format. For video, a CDN Resource is automatically enabled. Valid values: '0' | '1'
origin_port You can specify port through which we will access your origin.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/cdn-resource/details?login=name@domain.com&passwd=your_api_password&id=xx" # response {"status": "ok", "description": "Request was successful.", "cdnResource": {"id": xxx, "origin_url": "yourdomain.com", "cname": "cdn.yourdomain.com", "cache_expiry": 17280, "url_signing_on": 0, "url_signing_key": "", "qs_status": 0, "setcookie_status": 0, "other_cnames": FALSE, "storage_id": NULL, "type": "standard"}}

Edit

POST
https://api.cdn77.com/v2.0/cdn-resource/edit
Change your CDN Resource details.

Object in standard response: cdnResource

Parameters

Parameter Example Description
Parameter: login string* Example: info@domain.com Your login (email) to CDN77 control panel
Parameter: passwd string* Example: 8vL4BpXbRqgPTKA0h Your API password.
Parameter: id int* Example: Your CDN Id. See how to retrieve a list of your cdns including their ids.
Parameter: other_cnames array Example: ["cdn1.domain.ltd", "cdn2.domain.ltd", "cdn3.domain.ltd"] Array. Maximum length of array is 9.
Parameter: label string Example: myLabel Your own label of a CDN Resource.
Parameter: origin_scheme string Example: https URL scheme of the Origin. Valid values: 'http' | 'https'
Parameter: origin_url string Example: www.domain.ltd URL of your content source (Origin). Doesn't have to be set when CDN Storage Id is set (that means instead of using your own URL you use our CDN Storage).
Parameter: storage_id int Example: Storage Id. See available Storages and their Id in the list of storages. Set to 0 if you want to disable CDN Storage. Ignore query string (qs_status) is set to 1 when you enable CDN Storage as Origin.
Parameter: location_group int Example: Location group of CDN resource. Users cannot change it.
Parameter: cname string Example: cdn.domain.ltd Domain name that will redirect to our CDN server.
Parameter: cache_expiry int Example: 10 In minutes. Valid values: '10' | '10800' | '11520' | '12960' | '1440' | '14440' | '15840' | '17280' | '2160' | '240' | '2880' | '30' | '4320' | '5760' | '60' | '720' | '7200' | '8640'
Parameter: hlp_type string Example: blacklist Sets hotlink protection type Valid values: 'blacklist' | 'whitelist'
Parameter: hlp_referer_domains array Example: ["cdn1.domain.ltd", "cdn2.domain.ltd", "cdn3.domain.ltd"] Sets hotlink protection list of whitelisted/blacklisted referer domains
Parameter: hlp_deny_empty_referer bool Example: 0 Sets hotlink protection denying access with empty referer Valid values: '0' | '1'
Parameter: url_signing_on int Example: 0 Allow generating of secured links with expiration time. Content is not available without valid token. Valid values: '0' | '1'
Parameter: url_signing_type string Example: parameter Sets secure token type Valid values: 'parameter' | 'path'
Parameter: url_signing_key string Example: Key (hash) for signing URLs.
Parameter: qs_status int Example: 0 By default the entire URL is treated as a separate cacheable item. If you want to override this, set qs_status to '1', otherwise to '0'. If you have CDN Storage set as Origin, qs_status is automatically set to 1. Valid values: '0' | '1'
Parameter: setcookie_status int Example: 0 To cache Set-Cookies responses, set this to '1' (disabled by default). Valid values: '0' | '1'
Parameter: mp4_pseudo_on int Example: 0 Allow streaming video in mp4 format. For video, a CDN Resource is automatically enabled. Valid values: '0' | '1'
Parameter: gp_type string Example: blacklist Sets geo protection type. Valid values: 'blacklist' | 'whitelist'
Parameter: gp_countries array Example: ["FR", "GB", "US"] Sets geo protection list of whitelisted/blacklisted countries, enter the country's 2 character ISO code.
Parameter: ipp_type string Example: blacklist Sets IP protection type. Valid values: 'blacklist' | 'whitelist'
Parameter: ipp_addresses array Example: ["192.168.25.0/24", “72.53.0.0/16"] Sets IP protection list of whitelisted/blacklisted addresses. Accepts CIDR notation only.
Parameter: origin_port int Example: You can specify port through which we will access your origin.
Parameter: instant_ssl bool Example: 1 Set to 1 if you want to have a SSL certificate for every CNAME for free.
* Parameter required.

Return Values

Return Value Description
instant_ssl Set to 1 if you want to have a SSL certificate for every CNAME for free.
id Your CDN Id. See how to retrieve a list of your cdns including their ids.
type Valid values: 'standard' | 'video'
platform Check more about our new NeXt Generation platform. Valid values: 'nxg' | 'old'
origin_scheme URL scheme of the Origin. Valid values: 'http' | 'https'
origin_url URL of your content source (Origin). Doesn't have to be set when CDN Storage Id is set (that means instead of using your own URL you use our CDN Storage).
storage_id Storage Id. See available Storages and their Id in the list of storages. Set to 0 if you want to disable CDN Storage. Ignore query string (qs_status) is set to 1 when you enable CDN Storage as Origin.
cname Domain name that will redirect to our CDN server.
cache_expiry In minutes. Valid values: '10' | '10800' | '11520' | '12960' | '1440' | '14440' | '15840' | '17280' | '2160' | '240' | '2880' | '30' | '4320' | '5760' | '60' | '720' | '7200' | '8640'
url_signing_on Allow generating of secured links with expiration time. Content is not available without valid token. Valid values: '0' | '1'
url_signing_key Key (hash) for signing URLs.
qs_status By default the entire URL is treated as a separate cacheable item. If you want to override this, set qs_status to '1', otherwise to '0'. If you have CDN Storage set as Origin, qs_status is automatically set to 1. Valid values: '0' | '1'
setcookie_status To cache Set-Cookies responses, set this to '1' (disabled by default). Valid values: '0' | '1'
other_cnames Array. Maximum length of array is 9.
label Your own label of a CDN Resource.
hlp_type Sets hotlink protection type Valid values: 'blacklist' | 'whitelist'
hlp_deny_empty_referer Sets hotlink protection denying access with empty referer Valid values: '0' | '1'
hlp_referer_domains Sets hotlink protection list of whitelisted/blacklisted referer domains
mp4_pseudo_on Allow streaming video in mp4 format. For video, a CDN Resource is automatically enabled. Valid values: '0' | '1'

Examples

                                
                                                                            
# POST request
curl --data "login=name@domain.com&passwd=your_api_passwd&id=xxx&other_cnames[]=othercname.domain.com" https://api.cdn77.com/v2.0/cdn-resource/edit # response {"status": "ok", "description": "Request was successful.", "cdnResource": {"id": xxx, "origin_url": "yourdomain.com", "cname": "cdn.yourdomain.com", "cache_expiry": 17280, "url_signing_on": 0, "url_signing_key": "", "qs_status": 0, "setcookie_status": 0, "other_cnames": ["othercname.domain.com"], "storage_id": NULL, "type": "standard"}}    
# POST request with multiple CNAMEs
curl --data "login=name@domain.com&passwd= your_api_password&id=xxx&other_cnames[]=othercname.domain.com&other_cnames[]=othercname1.domain.com&other_cnames[]=othercname2.domain.com&other_cnames[]=othercname3.domain.com&other_cnames[]=othercname4.domain.com&other_cnames[]=othercname5.domain.com" https://api.cdn77.com/v2.0/cdn-resource/edit # response {"status": "ok", "description": "Request was successful.", "cdnResource": {"id": xxx, "origin_url": "yourdomain.com", "cname": "cdn.yourdomain.com", "cdn_url": "xxx.r.cdn77.net", "cache_expiry": 17280, "url_signing_on": 0, "url_signing_key": "", "qs_status": 0, "setcookie_status": 0, "other_cnames": ["othercname.domain.com", "othercname1.domain.com", "othercname2.domain.com", "othercname3.domain.com", "othercname4.domain.com", "othercname5.domain.com"], "platform": "old", "storage_id": null, "type": "video"}}

Delete

POST
https://api.cdn77.com/v2.0/cdn-resource/delete
Delete your CDN resource.

Parameters

Parameter Example Description
Parameter: login string* Example: info@domain.com Your login (email) to CDN77 control panel
Parameter: passwd string* Example: 8vL4BpXbRqgPTKA0h Your API password.
Parameter: id int* Example: Your CDN Id. See how to retrieve a list of your cdns including their ids.
* Parameter required.

Return Values

This method provides only standard response.

Examples

                                
                                                                            
# POST request
curl --data "login=name@domain.com&passwd=your_api_passwd&id=xxx" https://api.cdn77.com/v2.0/cdn-resource/delete # response {"status": "ok", "description": "Request was successful."}

List

GET
https://api.cdn77.com/v2.0/cdn-resource/list
List your CDN resource details.

Object in standard response: cdnResources

Parameters

Parameter Example Description
Parameter: login string* Example: info@domain.com Your login (email) to CDN77 control panel
Parameter: passwd string* Example: 8vL4BpXbRqgPTKA0h Your API password.
* Parameter required.

Return Values

Return Value Description
instant_ssl Set to 1 if you want to have a SSL certificate for every CNAME for free.
label Your own label of a CDN Resource.
id Your CDN Id. See how to retrieve a list of your cdns including their ids.
type Valid values: 'standard' | 'video'
origin_url URL of your content source (Origin). Doesn't have to be set when CDN Storage Id is set (that means instead of using your own URL you use our CDN Storage).
storage_id Storage Id. See available Storages and their Id in the list of storages. Set to 0 if you want to disable CDN Storage. Ignore query string (qs_status) is set to 1 when you enable CDN Storage as Origin.
cname Domain name that will redirect to our CDN server.
cache_expiry In minutes. Valid values: '10' | '10800' | '11520' | '12960' | '1440' | '14440' | '15840' | '17280' | '2160' | '240' | '2880' | '30' | '4320' | '5760' | '60' | '720' | '7200' | '8640'
url_signing_on Allow generating of secured links with expiration time. Content is not available without valid token. Valid values: '0' | '1'
url_signing_key Key (hash) for signing URLs.
qs_status By default the entire URL is treated as a separate cacheable item. If you want to override this, set qs_status to '1', otherwise to '0'. If you have CDN Storage set as Origin, qs_status is automatically set to 1. Valid values: '0' | '1'
setcookie_status To cache Set-Cookies responses, set this to '1' (disabled by default). Valid values: '0' | '1'
other_cnames Array. Maximum length of array is 9.
mp4_pseudo_on Allow streaming video in mp4 format. For video, a CDN Resource is automatically enabled. Valid values: '0' | '1'

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/cdn-resource/list?login=name@domain.com&passwd=your_api_password" # response {"status": "ok", "description": "Request was successful.", "cdnResources": [{"id": xxx, "origin_url": "cdn.example.com", "cname": "cdn.examples.com", "cache_expiry": 17280, "url_signing_on": 0, "url_signing_key": null, "qs_status": 0, "setcookie_status": 0, "other_cnames": false, "storage_id": null, "type": "standard"}, {"id": xxx, "origin_url": "www.otherexample.com", "cname": "cdn.otherexample.com", "cache_expiry": 720, "url_signing_on": 0, "url_signing_key": "tdtdtdtdtdtdtdtd", "qs_status": 0, "setcookie_status": 0, "other_cnames": ["othercname.otherexample.com"], "storage_id": null, "type": "standard"}]}