API

Quota

Our quotas (and therefore our pricing), are based on a combined allocation of CPU, RAM and disk. All customers start on a basic quota level and after a period of proving that the quota is being handled correctly or after a call to our offices, we can increase this quota.


Determining current quota

Describing the current quota for the current user is possible by making a GET request to the https://api.civo.com/v2/quota resource. If the API key is for a system account an optional name parameter can be passed in to get the quota for a given account.

Request

This request doesn't require any parameters passing in.

Response

The response from the server will be a JSON object describing the current quota limits and usage:

{
  "cpu_core_limit": 10,
  "cpu_core_usage": 3,
  "ram_mb_limit": 5120,
  "ram_mb_usage": 1536,
  "disk_gb_limit": 250,
  "disk_gb_usage": 75,
  "public_ip_address_limit": 20,
  "public_ip_address_usage": 3
}

Example of listing available sizes

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

request.get(
  'https://api.civo.com/v2/quota',
  {},
  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/quota', headers)