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:

{
  "id": "44aab548-61ca-11e5-860e-5cf9389be614",
  "default_user_id": "ca04ddda-06e1-469a-ad63-27ac3298c42c",
  "default_user_email_address": "johnsmith@example.com",
  "instance_count_limit": 16,
  "instance_count_usage": 6,
  "cpu_core_limit": 10,
  "cpu_core_usage": 3,
  "ram_mb_limit": 5120,
  "ram_mb_usage": 1536,
  "disk_gb_limit": 250,
  "disk_gb_usage": 75,
  "disk_volume_count_limit": 16,
  "disk_volume_count_usage": 6,
  "disk_snapshot_count_limit": 30,
  "disk_snapshot_count_usage": 0,
  "public_ip_address_limit": 16,
  "public_ip_address_usage": 6,
  "subnet_count_limit": 10,
  "subnet_count_usage": 1,
  "network_count_limit": 10,
  "network_count_usage": 1,
  "security_group_limit": 16,
  "security_group_usage": 5,
  "security_group_rule_limit": 160,
  "security_group_rule_usage": 24,
  "port_count_limit": 32,
  "port_count_usage": 7,
  "clusters_lifetime_count": 0,
  "clusters_current_count": 0,
  "instances_lifetime_count": 0
}

Example of listing available sizes

curl -H "Authorization: bearer 12345" https://api.civo.com/v2/quota
// At a shell prompt run:
// npm init -y
// npm i --save request

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');
require 'net/http'

http = Net::HTTP.new('api.civo.com', 443)
http.use_ssl = true

headers = {
  'Authorization' => 'bearer 12345',
  'Content-Type' => 'application/x-www-form-urlencoded'
}

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