API documentation
Data Center Location
Manage the data center locations for your CDN Resources.
Available methods
DetailsEdit
Edit for All
List
Details
GET
https://api.cdn77.com/v2.0/data-center-location/details
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. |
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
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. |
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
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. |
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
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. |
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}, ... ]}