API documentation

Storage

Manage your CDN storage locations and their settings.

Available methods

Create
Details
Delete
List
Add Cdn Resource

Create

POST
https://api.cdn77.com/v2.0/storage/create
Create a CDN storage.

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: zone_name string* Example: Zone name has to be unique. Allowed characters: latin alphabet characters, numbers, spaces and '-', '_' symbols.
Parameter: storage_location_id string* Example: Storage Location Id. Retrieve list of available storage locations including their ids with the list storage location method.
* Parameter required.

Return Values

Return Value Description
id Retrieve list of storages including their ids with the list method.
zone_name Zone name has to be unique. Allowed characters: latin alphabet characters, numbers, spaces and '-', '_' symbols.
storage_location_id Storage Location Id. Retrieve list of available storage locations including their ids with the list storage location method.
used_space Amount of space used by your data on the CDN Storage.
cdn_resources IDs of CDN Resources using this storage.
credentials Object with params: protocol, host, user, pass.

Examples

                                
                                                                            
# POST request
curl --data "login=name@domain.com&passwd=your_api_password&zone_name=example&storage_location_id=push-9.cdn77.com" https://api.cdn77.com/v2.0/storage/create # response {"status": "ok", "description": "Request was successful.", "storage": {"id": "user_xxxxxx", "zone_name": "example", "storage_location_id": "push-9.cdn77.com", "used_space": "0 Bytes", "cdn_resources": [], "credentials": {"protocol": "FTP, SFTP", "host": "push-9.cdn77.com", "user": "user_xxxxxx", "pass": "yyyyyy"}}}

Details

GET
https://api.cdn77.com/v2.0/storage/details
Get details of your CDN storage.

Parameters

Parameter Example Description
Parameter: login string* Example: info@domain.com Your login (email) to CDN77 control panel
Parameter: id string* Example: Retrieve list of storages including their ids with the list method.
Parameter: passwd string* Example: 8vL4BpXbRqgPTKA0h Your API password.
* Parameter required.

Return Values

Return Value Description
id Retrieve list of storages including their ids with the list method.
zone_name Zone name has to be unique. Allowed characters: latin alphabet characters, numbers, spaces and '-', '_' symbols.
storage_location_id Storage Location Id. Retrieve list of available storage locations including their ids with the list storage location method.
used_space Amount of space used by your data on the CDN Storage.
cdn_resources IDs of CDN Resources using this storage.
credentials Object with params: protocol, host, user, pass.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/storage/details?login=name@domain.com&passwd=your_api_passwd&id=xxx" # response {"status": "ok", "description": "Request was successful.", "storage": {"id": "user_xxxxxx", "zone_name": "example", "storage_location_id": "push-9.cdn77.com", "used_space": "4.03 MB", "cdn_resources": [12345,54321], "credentials": {"protocol": "FTP, SFTP", "host": "push-9.cdn77.com", "user": "user_xxxxxx", "pass": "yyyyyy"}}}

Delete

POST
https://api.cdn77.com/v2.0/storage/delete
Delete your CDN storage.

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 string* Example: Retrieve list of storages including their ids 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_password&id=xx" https://api.cdn77.com/v2.0/storage/delete # response {"status": "ok", "description": "CDN Storage your-storage-name was successfully deleted."}

List

GET
https://api.cdn77.com/v2.0/storage/list
Get a list of your CDN storages. This will include the storage ID, label/name, location, used space, login and the number of resources using the storage.

Parameters

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

Return Values

Return Value Description
id Retrieve list of storages including their ids with the list method.
zone_name Zone name has to be unique. Allowed characters: latin alphabet characters, numbers, spaces and '-', '_' symbols.
storage_location_id Storage Location Id. Retrieve list of available storage locations including their ids with the list storage location method.
used_space Amount of space used by your data on the CDN Storage.
cdn_resources IDs of CDN Resources using this storage.
credentials Object with params: protocol, host, user, pass.

Examples

                                
                                                                            
# GET request
curl "https://api.cdn77.com/v2.0/storage/list?login=name@domain.com&passwd=your_api_password" #response {"status": "ok", "description": "Request was successful.", "storages": [{"id": "user_xxxxxx", "zone_name": "example", "storage_location_id": "push-9.cdn77.com", "used_space": "4.03 MB", "cdn_resources": [12345], "credentials": {"protocol": "FTP, SFTP", "host": "push-9.cdn77.com", "user": "user_xxxxxx", "pass": "yyyyyy"}}, {"id": "user_xxxxxx", "zone_name": "another example", "storage_location_id": "push-9.cdn77.com", "used_space": "14.08 MB", "cdn_resources": [56789,91234], "credentials": {"protocol": "FTP, FTP-TLS, FTP-SSL", "host": "push-3.cdn77.com", "user": "user_xxxxxx", "pass": "yyyyyy"}}]}

Add Cdn Resource

POST
https://api.cdn77.com/v2.0/storage/add-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 string* Example: Retrieve list of storages including their ids with the list method.
Parameter: cdn_ids array* Example: List of ids of CDN Resources. See how to retrieve list of CDN Resources.
* Parameter required.

Return Values

This method provides only standard response.