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
login string* info@domain.com Your login (email) to CDN77 control panel
passwd string* 8vL4BpXbRqgPTKA0h Your API password.
label string* myLabel Your own label of a CDN Resource.
type string* standard Valid values: 'standard' | 'video'
origin_scheme string https URL scheme of the Origin. Valid values: 'http' | 'https'
origin_url string 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).
origin_port int You can specify port through which we will access your origin.
storage_id int 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 string cdn.domain.ltd Domain name that will redirect to our CDN server.
other_cnames array ["cdn1.domain.ltd", "cdn2.domain.ltd", "cdn3.domain.ltd"] Array. Maximum length of array is 9.
cache_expiry int 10 In minutes. Valid values: '10' | '10800' | '11520' | '12960' | '1440' | '14440' | '15840' | '17280' | '2160' | '240' | '2880' | '30' | '4320' | '5760' | '60' | '720' | '7200' | '8640'
qs_status int 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'
setcookie_status int 0 To cache Set-Cookies responses, set this to '1' (disabled by default). Valid values: '0' | '1'
mp4_pseudo_on int 0 Allow streaming video in mp4 format. For video, a CDN Resource is automatically enabled. Valid values: '0' | '1'
gp_type string blacklist Sets geo protection type. Valid values: 'blacklist' | 'whitelist'
gp_countries array ["FR", "GB", "US"] Sets geo protection list of whitelisted/blacklisted countries, enter the country's 2 character ISO code.
ipp_type string blacklist Sets IP protection type. Valid values: 'blacklist' | 'whitelist'
ipp_addresses array ["192.168.25.0/24", “72.53.0.0/16"] Sets IP protection list of whitelisted/blacklisted addresses. Accepts CIDR notation only.
url_signing_on int 0 Allow generating of secured links with expiration time. Content is not available without valid token. Valid values: '0' | '1'
url_signing_type string parameter Sets secure token type Valid values: 'parameter' | 'path'
url_signing_key string 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).
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.
label > Your own label of a CDN Resource.
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
id int* Your CDN Id. See how to retrieve a list of your cdns including their ids.
passwd string* 8vL4BpXbRqgPTKA0h Your API password.
login string* info@domain.com Your login (email) to CDN77 control panel
* Parameter required.

Return Values

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

Return Values

Return Value Description
label > Your own label of a CDN Resource.
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'
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"}]}