Storage

Available methods:

Manage your CDN storage locations and theirĀ settings.

Create

POSThttps://api.cdn77.com/v2.0/storage/create

Parameters

Parameter Example Description
login string* info@domain.com Your login (email) to CDN77 control panel
passwd string* 8vL4BpXbRqgPTKA0h Your API password.
zone_name string* Zone name has to be unique. Allowed characters: latin alphabet characters, numbers, spaces and '-', '_' symbols.
storage_location_id string* Storage Location Id. Retrieve list of available storage locations including their ids with the list storage location method.

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

GEThttps://api.cdn77.com/v2.0/storage/details

Parameters

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

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

POSThttps://api.cdn77.com/v2.0/storage/delete

Parameters

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

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

GEThttps://api.cdn77.com/v2.0/storage/list

Parameters

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

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

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