API documentation

Data Center Location

Manage the data center locations for your CDN Resources.

Available methods

Details
Edit
Edit for All
List

Details

GET
https://api.cdn77.com/v2.0/data-center-location/details
Get the ID, name, country and price of a data center location.

Object in standard response: dataCenterLocation

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: Data Center Location Id. Retrieve the list of data center locations with their Ids with the list method.
* Parameter required.

Return Values

Return Value Description
id Data Center Location Id. Retrieve the list of data center locations with their Ids with the list method.
name Billing country name.
country CDN Resource Location Country (two character ISO code). e.g. 'NL'.
price Price is in USD.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/data-center-location/details?login=name@domain.com&passwd=your_api_password&id=singapore" # response {"status": "ok", "description": "Request was successful.", "dataCenterLocation": {"id": "singapore", "name": "Singapore", "country": "SG", "price": xx}}

Edit

POST
https://api.cdn77.com/v2.0/data-center-location/edit
Set the data center locations that your CDN resource will use.

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: cdn_id int* Example: CDN Id. See how to retrieve a list of your CDNs including their Ids.
Parameter: locations array* Example: ["sydney","zurich"] Array of Ids of locations. Existing values will be replaced by sent values. Retrieve list of locations with the list method.
* Parameter required.

Return Values

This method provides only standard response.

Examples

                                
                                                                            
# POST request
curl --data "login=name@domain.com&passwd=your_api_passwd&cdn_id=xxx&locations[]=prague&locations[]=amsterdam" https://api.cdn77.com/v2.0/data-center-location/edit # response {"status": "ok", "description": "Update of datacenter locations was queued and will be executed in few minutes."}

Edit for All

POST
https://api.cdn77.com/v2.0/data-center-location/edit-for-all
Set the data center locations for all of your CDN Resources.

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: locations array* Example: ["sydney","zurich"] Array of Ids of locations. Existing values will be replaced by sent values. Retrieve list of locations with the list method.
* Parameter required.

Return Values

This method provides only standard response.

Examples

                                
                                                                            
# POST request
curl --data "login=name@domain.com&passwd=your_api_passwd&locations[]=prague&locations[]=amsterdam" https://api.cdn77.com/v2.0/data-center-location/edit-for-all # response {"status": "ok", "description": "Update of datacenter locations was queued and will be executed in few minutes."}

List

GET
https://api.cdn77.com/v2.0/data-center-location/list
Get a list of all activate data center locations. The response will include the Id, name, country and price of each data center location. If param cdn_id is set, it will return only locations that the CDN Resource is using. If this value has not been set, the return will be for all locations.

Object in standard response: dataCenterLocations

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: cdn_id int Example: CDN Id. See how to retrieve a list of your CDNs including their Ids.
* Parameter required.

Return Values

Return Value Description
id Data Center Location Id. Retrieve the list of data center locations with their Ids with the list method.
name Billing country name.
country CDN Resource Location Country (two character ISO code). e.g. 'NL'.
price Price is in USD.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/data-center-location/list?login=name@domain.com&passwd=your_api_passwd&cdn_id=xxx" # response {"status": "ok", "description": "Request was successful.", "dataCenterLocations": [{"id": "amsterdam", "name": "Amsterdam", "country": "NL", "price": xx}, {"id": "ankara", "name": "Ankara", "country": "TR", "price": xx}, {"id": "atlanta", "name": "Atlanta", "country": "US", "price": xx}, {"id": "budapest", "name": "Budapest", "country": "HU", "price": xx}, ... ]}