API

Instance Sizes

Instances are sized by combinations of CPU virtual cores, memory and disk space. Custom sizes can also be created by customers, as our quotas and therefore pricing are based on a combined allocation of CPU, RAM and disk.


Listing available sizes

Listing the available sizes is possible by making a GET request to the https://api.civo.com/v2/sizes resource.

Request

This request doesn't take any parameters.

Response

The response from the server will be a JSON array of sizes, each with a name and the appropriate attributes.

[
  {
    "name": "micro",
    "cpu_cores": 1,
    "ram_mb": 512,
    "disk_gb": 25
  },
  {
    "name": "mini",
    "cpu_cores": 2,
    "ram_mb": 1024,
    "disk_gb": 50
  },
  // ...
]

Example of listing available sizes

curl -H "Authorization: bearer 12345" https://api.civo.com/v2/sizes
var request = require('request');

request.get(
  'https://api.civo.com/v2/sizes',
  {},
  function (error, response, body) {
    if (!error && response.statusCode == 200) {
      console.log(body)
    }
  }
).auth(null, null, true, '12345');
http = Net::HTTPS.new('api.civo.com', 443)
headers = {
  'Authorization' => 'bearer 123456',
  'Content-Type' => 'application/x-www-form-urlencoded'
}

resp, data = get('v2/sizes', headers)