Billing

Balance

Allowed HTTP methods

Method Description
GET get / list object/s

Note

See RFC 2616#section-9 for more details on HTTP methods semantics

Listing

GET /balance/

Get the balance and currency of the current account.

Status Codes:
  • 200 – no error

Example request:

GET /api/2.0/balance/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "balance": "155367.99237092264288897986",
    "credit_limit": null,
    "currency": "EUR"
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get"
    ],
    "allowed_list_http_methods": [
        "get"
    ],
    "default_format": "application/json",
    "default_limit": 20,
    "fields": {
        "balance": {
            "default": "No default provided.",
            "help_text": "Amount of money in account",
            "readonly": true,
            "required": true,
            "type": "decimal"
        },
        "credit_limit": {
            "default": "No default provided.",
            "help_text": "Credit limit applied to the account, if present",
            "readonly": true,
            "required": true,
            "type": "string"
        },
        "currency": {
            "default": "No default provided.",
            "help_text": "Currency of the account",
            "readonly": true,
            "required": true,
            "type": "string"
        }
    },
    "filtering": {
        "name": "exact",
        "name__contains": "exact",
        "tag": "exact",
        "uuid": "exact"
    }
}

Pricing

Allowed HTTP methods

Method Description
GET get / list object/s

Note

See RFC 2616#section-9 for more details on HTTP methods semantics

Listing

GET /pricing/

Gets the pricing information that are applicable to the cloud. Subscription prices use a burst level of 0.

Status Codes:
  • 200 – no error

Example request:

GET /api/2.0/pricing/?limit=5 HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "current": {
        "cpu": 20,
        "dssd": 1,
        "ip": 1,
        "mem": 17,
        "msft_7jq_00341": 1,
        "msft_7nq_00302": 1,
        "msft_p73_04837_core": 1,
        "msft_tfa_00523": 1,
        "sms": 1,
        "sparc_t4_cpu": 1,
        "sparc_t4_mem": 1,
        "ssd": 1,
        "tx": 1,
        "vlan": 1,
        "vlan_ecx": 1,
        "zadara": 1
    },
    "meta": {
        "limit": 5,
        "offset": 0,
        "total_count": 484
    },
    "next": {
        "cpu": 20,
        "dssd": 1,
        "ip": 1,
        "mem": 17,
        "msft_7jq_00341": 1,
        "msft_7nq_00302": 1,
        "msft_p73_04837_core": 1,
        "msft_tfa_00523": 1,
        "sms": 1,
        "sparc_t4_cpu": 1,
        "sparc_t4_mem": 1,
        "ssd": 1,
        "tx": 1,
        "vlan": 1,
        "vlan_ecx": 1,
        "zadara": 1
    },
    "objects": [
        {
            "currency": "GBP",
            "id": "656",
            "level": 1,
            "multiplier": 2783138807808000,
            "price": "0.18200000000000000000",
            "resource": "dssd",
            "unit": "GB/month"
        },
        {
            "currency": "EUR",
            "id": "636",
            "level": 1,
            "multiplier": 2783138807808000,
            "price": "0.21000000000000000000",
            "resource": "dssd",
            "unit": "GB/month"
        },
        {
            "currency": "USD",
            "id": "616",
            "level": 1,
            "multiplier": 2783138807808000,
            "price": "0.28000000000000000000",
            "resource": "dssd",
            "unit": "GB/month"
        },
        {
            "currency": "CHF",
            "id": "596",
            "level": 1,
            "multiplier": 2783138807808000,
            "price": "0.26600000000000000000",
            "resource": "dssd",
            "unit": "GB/month"
        },
        {
            "currency": "USD",
            "id": "307",
            "level": 0,
            "multiplier": 2783138807808000,
            "price": "0.14000000000000000000",
            "resource": "dssd",
            "unit": "GB/month"
        }
    ]
}

Burst levels

The current and future burst levels are provided in objects at the root of the response. The burst levels are calculated every 5 minutes based on the usage of the cloud and are applied 5 minutes later (when the next burst levels are calculated)

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "current": {
        "cpu": 20, 
        "dssd": 1, 
        "ip": 1, 
        "mem": 17, 
        "msft_7jq_00341": 1, 
        "msft_7nq_00302": 1, 
        "msft_p73_04837_core": 1, 
        "msft_tfa_00523": 1, 
        "sms": 1, 
        "sparc_t4_cpu": 1, 
        "sparc_t4_mem": 1, 
        "ssd": 1, 
        "tx": 1, 
        "vlan": 1, 
        "vlan_ecx": 1, 
        "zadara": 1
    }, 
    "next": {
        "cpu": 20, 
        "dssd": 1, 
        "ip": 1, 
        "mem": 17, 
        "msft_7jq_00341": 1, 
        "msft_7nq_00302": 1, 
        "msft_p73_04837_core": 1, 
        "msft_tfa_00523": 1, 
        "sms": 1, 
        "sparc_t4_cpu": 1, 
        "sparc_t4_mem": 1, 
        "ssd": 1, 
        "tx": 1, 
        "vlan": 1, 
        "vlan_ecx": 1, 
        "zadara": 1
    }
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get"
    ],
    "allowed_list_http_methods": [
        "get"
    ],
    "default_format": "application/json",
    "default_limit": 0,
    "fields": {
        "currency": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "The currency of the price",
            "nullable": false,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "id": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": true
        },
        "level": {
            "blank": false,
            "default": 0,
            "help_text": "The burst level the price applies to",
            "nullable": false,
            "readonly": false,
            "type": "integer",
            "unique": false
        },
        "multiplier": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "The multiplier applied to get the price of one unit per second, from the unit of the price",
            "nullable": false,
            "readonly": true,
            "type": "integer",
            "unique": false
        },
        "price": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Price",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        },
        "resource": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "The resource the price applies to",
            "nullable": false,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "unit": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "The unit of the price",
            "nullable": false,
            "readonly": true,
            "type": "string",
            "unique": false
        }
    },
    "filtering": {
        "level": 1
    }
}

Discounts

Allowed HTTP methods

Method Description
GET get / list object/s

Note

See RFC 2616#section-9 for more details on HTTP methods semantics

Listing

GET /discount/

Get discount information.

statuscode 200:no error

Example request:

GET /api/2.0/discount/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "meta": {
        "limit": 0,
        "offset": 0,
        "total_count": 5
    },
    "objects": [
        {
            "period": "3 months",
            "value": "0.0300000000"
        },
        {
            "period": "6 months",
            "value": "0.1000000000"
        },
        {
            "period": "1 year",
            "value": "0.2500000000"
        },
        {
            "period": "2 years",
            "value": "0.3500000000"
        },
        {
            "period": "3 years",
            "value": "0.4500000000"
        }
    ]
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get"
    ],
    "allowed_list_http_methods": [
        "get"
    ],
    "default_format": "application/json",
    "default_limit": 0,
    "fields": {
        "period": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "The minimum period for this discount",
            "nullable": true,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "value": {
            "blank": false,
            "default": 0,
            "help_text": "The value of the discount",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        }
    }
}

Transaction list

Allowed HTTP methods

Method Description
GET get / list object/s

Note

See RFC 2616#section-9 for more details on HTTP methods semantics

Listing

GET /ledger/

Get the transactions for the account.

statuscode 200:no error

Example request:

GET /api/2.0/ledger/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "meta": {
        "limit": 20,
        "offset": 0,
        "total_count": 98203
    },
    "objects": [
        {
            "amount": "0.00014583333333333333",
            "billing_cycle": 105157,
            "end": "469291.07488238102453490453",
            "human_interval": "5 minutes",
            "id": "39509304",
            "initial": "469291.07502821435786823786",
            "interval": 300,
            "poll_time": "2014-06-05T09:06:06.713945+00:00",
            "reason": "Burst: 4.50 GB of dssd for 5 minutes at 2014-06-05 09:06",
            "resource_amount": "4831838208",
            "time": "2014-06-05T09:08:47.992023+00:00"
        },
        {
            "amount": "0.00908310000000000000",
            "billing_cycle": 105150,
            "end": "469291.07502821435786823786",
            "human_interval": "2 minutes",
            "id": "39506824",
            "initial": "469291.08411131435786823786",
            "interval": 137,
            "poll_time": "2014-06-05T08:31:06.610957+00:00",
            "reason": "Burst: 12.00 GHz of cpu for 2 minutes at 2014-06-05 08:31",
            "resource_amount": "12000",
            "time": "2014-06-05T08:33:48.047354+00:00"
        },
        {
            "amount": "0.00255733333333333333",
            "billing_cycle": 105150,
            "end": "469291.08411131435786823786",
            "human_interval": "2 minutes",
            "id": "39506823",
            "initial": "469291.08666864769120157119",
            "interval": 137,
            "poll_time": "2014-06-05T08:31:06.610957+00:00",
            "reason": "Burst: 4.00 GB of mem for 2 minutes at 2014-06-05 08:31",
            "resource_amount": "4294967296",
            "time": "2014-06-05T08:33:48.036326+00:00"
        },
        {
            "amount": "0.00014534722222222222",
            "billing_cycle": 105148,
            "end": "469291.08666864769120157119",
            "human_interval": "5 minutes",
            "id": "39506114",
            "initial": "469291.08681399491342379341",
            "interval": 299,
            "poll_time": "2014-06-05T08:21:06.603517+00:00",
            "reason": "Burst: 4.50 GB of dssd for 5 minutes at 2014-06-05 08:21",
            "resource_amount": "4831838208",
            "time": "2014-06-05T08:23:50.433096+00:00"
        },
        {
            "amount": "-55.45000000000000284217",
            "billing_cycle": null,
            "end": "469291.08681399491342379341",
            "human_interval": null,
            "id": "39505412",
            "initial": "469235.63681399491342095124",
            "interval": null,
            "poll_time": "2014-06-05T08:16:04.495196+00:00",
            "reason": "Payment through card - 9fddd858-ec89-11e3-8c3b-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T08:16:04.495183+00:00"
        },
        {
            "amount": "-77.23000000000000397904",
            "billing_cycle": null,
            "end": "469235.63681399491342095124",
            "human_interval": null,
            "id": "39505411",
            "initial": "469158.40681399491341697220",
            "interval": null,
            "poll_time": "2014-06-05T08:15:58.552271+00:00",
            "reason": "Payment through card - 9c37a0bc-ec89-11e3-8c3b-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T08:15:58.552247+00:00"
        },
        {
            "amount": "0.00888420000000000000",
            "billing_cycle": 105138,
            "end": "469158.40681399491341697220",
            "human_interval": "2 minutes",
            "id": "39502556",
            "initial": "469158.41569819491341697220",
            "interval": 134,
            "poll_time": "2014-06-05T07:31:06.597276+00:00",
            "reason": "Burst: 12.00 GHz of cpu for 2 minutes at 2014-06-05 07:31",
            "resource_amount": "12000",
            "time": "2014-06-05T07:33:51.033990+00:00"
        },
        {
            "amount": "0.00250133333333333333",
            "billing_cycle": 105138,
            "end": "469158.41569819491341697220",
            "human_interval": "2 minutes",
            "id": "39502555",
            "initial": "469158.41819952824675030553",
            "interval": 134,
            "poll_time": "2014-06-05T07:31:06.597276+00:00",
            "reason": "Burst: 4.00 GB of mem for 2 minutes at 2014-06-05 07:31",
            "resource_amount": "4294967296",
            "time": "2014-06-05T07:33:51.022223+00:00"
        },
        {
            "amount": "0.00014534722222222222",
            "billing_cycle": 105136,
            "end": "469158.41819952824675030553",
            "human_interval": "5 minutes",
            "id": "39501851",
            "initial": "469158.41834487546897252775",
            "interval": 299,
            "poll_time": "2014-06-05T07:21:06.607872+00:00",
            "reason": "Burst: 4.50 GB of dssd for 5 minutes at 2014-06-05 07:21",
            "resource_amount": "4831838208",
            "time": "2014-06-05T07:23:49.590257+00:00"
        },
        {
            "amount": "-55.45000000000000284217",
            "billing_cycle": null,
            "end": "469158.41834487546897252775",
            "human_interval": null,
            "id": "39501157",
            "initial": "469102.96834487546896968558",
            "interval": null,
            "poll_time": "2014-06-05T07:16:04.926285+00:00",
            "reason": "Payment through card - 3fe9a3bc-ec81-11e3-bf8f-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T07:16:04.926273+00:00"
        },
        {
            "amount": "-77.23000000000000397904",
            "billing_cycle": null,
            "end": "469102.96834487546896968558",
            "human_interval": null,
            "id": "39501156",
            "initial": "469025.73834487546896570654",
            "interval": null,
            "poll_time": "2014-06-05T07:16:01.585853+00:00",
            "reason": "Payment through card - 3dca136e-ec81-11e3-bf8f-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T07:16:01.585840+00:00"
        },
        {
            "amount": "0.00633993750000000000",
            "billing_cycle": 105126,
            "end": "469025.73834487546896570654",
            "human_interval": "2 minutes",
            "id": "39498298",
            "initial": "469025.74468481296896570654",
            "interval": 135,
            "poll_time": "2014-06-05T06:31:06.554201+00:00",
            "reason": "Burst: 8.50 GHz of cpu for 2 minutes at 2014-06-05 06:31",
            "resource_amount": "8500",
            "time": "2014-06-05T06:33:52.255963+00:00"
        },
        {
            "amount": "0.00031500000000000000",
            "billing_cycle": 105126,
            "end": "469025.74468481296896570654",
            "human_interval": "2 minutes",
            "id": "39498297",
            "initial": "469025.74499981296896570654",
            "interval": 135,
            "poll_time": "2014-06-05T06:31:06.554201+00:00",
            "reason": "Burst: 0.50 GB of mem for 2 minutes at 2014-06-05 06:31",
            "resource_amount": "536870912",
            "time": "2014-06-05T06:33:52.244645+00:00"
        },
        {
            "amount": "0.00014534722222222222",
            "billing_cycle": 105124,
            "end": "469025.74499981296896570654",
            "human_interval": "5 minutes",
            "id": "39497582",
            "initial": "469025.74514516019118792876",
            "interval": 299,
            "poll_time": "2014-06-05T06:21:06.570020+00:00",
            "reason": "Burst: 4.50 GB of dssd for 5 minutes at 2014-06-05 06:21",
            "resource_amount": "4831838208",
            "time": "2014-06-05T06:23:51.102193+00:00"
        },
        {
            "amount": "-55.45000000000000284217",
            "billing_cycle": null,
            "end": "469025.74514516019118792876",
            "human_interval": null,
            "id": "39496879",
            "initial": "468970.29514516019118508659",
            "interval": null,
            "poll_time": "2014-06-05T06:16:03.979389+00:00",
            "reason": "Payment through card - dc2f7084-ec78-11e3-bf8f-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T06:16:03.979376+00:00"
        },
        {
            "amount": "-77.23000000000000397904",
            "billing_cycle": null,
            "end": "468970.29514516019118508659",
            "human_interval": null,
            "id": "39496878",
            "initial": "468893.06514516019118110755",
            "interval": null,
            "poll_time": "2014-06-05T06:15:58.310868+00:00",
            "reason": "Payment through card - d88fbc54-ec78-11e3-bf8f-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T06:15:58.310852+00:00"
        },
        {
            "amount": "0.00536987500000000000",
            "billing_cycle": 105114,
            "end": "468893.06514516019118110755",
            "human_interval": "2 minutes",
            "id": "39494022",
            "initial": "468893.07051503519118110755",
            "interval": 133,
            "poll_time": "2014-06-05T05:31:06.501327+00:00",
            "reason": "Burst: 7.50 GHz of cpu for 2 minutes at 2014-06-05 05:31",
            "resource_amount": "7500",
            "time": "2014-06-05T05:33:52.682096+00:00"
        },
        {
            "amount": "0.00014583333333333333",
            "billing_cycle": 105112,
            "end": "468893.07051503519118110755",
            "human_interval": "5 minutes",
            "id": "39493319",
            "initial": "468893.07066086852451444088",
            "interval": 300,
            "poll_time": "2014-06-05T05:21:06.511910+00:00",
            "reason": "Burst: 4.50 GB of dssd for 5 minutes at 2014-06-05 05:21",
            "resource_amount": "4831838208",
            "time": "2014-06-05T05:23:50.866953+00:00"
        },
        {
            "amount": "-55.45000000000000284217",
            "billing_cycle": null,
            "end": "468893.07066086852451444088",
            "human_interval": null,
            "id": "39492621",
            "initial": "468837.62066086852451159871",
            "interval": null,
            "poll_time": "2014-06-05T05:15:59.277046+00:00",
            "reason": "Payment through card - 78fc2118-ec70-11e3-8c3b-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T05:15:59.277034+00:00"
        },
        {
            "amount": "-77.23000000000000397904",
            "billing_cycle": null,
            "end": "468837.62066086852451159871",
            "human_interval": null,
            "id": "39492620",
            "initial": "468760.39066086852450761967",
            "interval": null,
            "poll_time": "2014-06-05T05:15:55.898020+00:00",
            "reason": "Payment through card - 76a699d4-ec70-11e3-8c3b-00259082dfa8",
            "resource_amount": "1",
            "time": "2014-06-05T05:15:55.898007+00:00"
        }
    ]
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get"
    ],
    "allowed_list_http_methods": [
        "get"
    ],
    "default_format": "application/json",
    "default_limit": 20,
    "fields": {
        "amount": {
            "blank": false,
            "default": 0,
            "help_text": "Amount of the operation, positive for debits, negative for credits",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        },
        "billing_cycle": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Billing cycle that generated this charge",
            "nullable": true,
            "readonly": false,
            "type": "integer",
            "unique": false
        },
        "end": {
            "blank": false,
            "default": 0,
            "help_text": "Amount of money after the operation",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        },
        "human_interval": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Human readable interval of bill entry",
            "nullable": true,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "id": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": true
        },
        "initial": {
            "blank": false,
            "default": 0,
            "help_text": "Amount of money before the operation",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        },
        "interval": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Interval of bill entry",
            "nullable": true,
            "readonly": false,
            "type": "integer",
            "unique": false
        },
        "poll_time": {
            "blank": false,
            "default": "2014-06-05T09:41:58.809494+00:00",
            "help_text": "A date & time as a string. Ex: \"2010-11-10T03:07:43\"",
            "nullable": false,
            "readonly": false,
            "type": "datetime",
            "unique": false
        },
        "reason": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Description of the operation",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "resource_amount": {
            "blank": false,
            "default": 1,
            "help_text": "Resource amount",
            "nullable": true,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "time": {
            "blank": false,
            "default": "2014-06-05T09:41:58.809480+00:00",
            "help_text": "A date & time as a string. Ex: \"2010-11-10T03:07:43\"",
            "nullable": false,
            "readonly": false,
            "type": "datetime",
            "unique": false
        }
    },
    "filtering": {
        "billing_cycle": 1,
        "time": 1
    },
    "ordering": [
        "time"
    ]
}

Discounts

Allowed HTTP methods

Method Description
GET get / list object/s

Note

See RFC 2616#section-9 for more details on HTTP methods semantics

Listing

GET /discount/

Get discount information.

statuscode 200:no error

Example request:

GET /api/2.0/discount/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "meta": {
        "limit": 0,
        "offset": 0,
        "total_count": 5
    },
    "objects": [
        {
            "period": "3 months",
            "value": "0.0300000000"
        },
        {
            "period": "6 months",
            "value": "0.1000000000"
        },
        {
            "period": "1 year",
            "value": "0.2500000000"
        },
        {
            "period": "2 years",
            "value": "0.3500000000"
        },
        {
            "period": "3 years",
            "value": "0.4500000000"
        }
    ]
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get"
    ],
    "allowed_list_http_methods": [
        "get"
    ],
    "default_format": "application/json",
    "default_limit": 0,
    "fields": {
        "period": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "The minimum period for this discount",
            "nullable": true,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "value": {
            "blank": false,
            "default": 0,
            "help_text": "The value of the discount",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        }
    }
}

Current usage

Allowed HTTP methods

Method Description
GET get / list object/s

Note

See RFC 2616#section-9 for more details on HTTP methods semantics

Listing

GET /currentusage/

Get the current usage of the user.

Status Codes:
  • 200 – no error

Example request:

GET /api/2.0/currentusage/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "balance": {
        "balance": "155367.99237092264288897986",
        "currency": "EUR"
    },
    "usage": {
        "amd_cpu": {
            "burst": 0,
            "subscribed": 10000,
            "using": 0
        },
        "amd_mem": {
            "burst": 0,
            "subscribed": 17179869184,
            "using": 0
        },
        "cpu": {
            "burst": 0,
            "subscribed": 10000,
            "using": 0
        },
        "dssd": {
            "burst": 0,
            "subscribed": 32212254720,
            "using": 30064771072
        },
        "ip": {
            "burst": 0,
            "subscribed": 1,
            "using": 1
        },
        "mem": {
            "burst": 0,
            "subscribed": 17179869184,
            "using": 0
        },
        "msft_7jq_00341": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "msft_7nq_00302": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "msft_p73_04837_core": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "msft_tfa_00523": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "sms": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "sparc_t4_cpu": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "sparc_t4_mem": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "ssd": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "tx": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "vlan": {
            "burst": 0,
            "subscribed": 1,
            "using": 1
        },
        "vlan_ecx": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        },
        "zadara": {
            "burst": 0,
            "subscribed": 0,
            "using": 0
        }
    }
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get"
    ],
    "allowed_list_http_methods": [
        "get"
    ],
    "default_format": "application/json",
    "default_limit": 20,
    "fields": {
        "balance": {
            "default": "No default provided.",
            "help_text": "A dictionary of data. Ex: {'price': 26.73, 'name': 'Daniel'}",
            "readonly": false,
            "required": true,
            "type": "dict"
        },
        "usage": {
            "default": "No default provided.",
            "help_text": "A dictionary of data. Ex: {'price': 26.73, 'name': 'Daniel'}",
            "readonly": false,
            "required": true,
            "type": "dict"
        }
    },
    "filtering": {
        "name": "exact",
        "name__contains": "exact",
        "tag": "exact",
        "uuid": "exact"
    }
}

Licenses list

Allowed HTTP methods

Method Description
GET get / list object/s

Note

See RFC 2616#section-9 for more details on HTTP methods semantics

Listing

GET /licenses/

Get the licenses available on the cloud. The type of the license can be one of:

Status Codes:
  • 200 – no error
  • install - These licenses are billed per installation, regardless of whether it is attached to a running server or not.
  • instance - These licenses are billed per running instance of a server. A license attached to a guest that’s stopped is not billed.
  • stub - These licenses are billed per a metric specified by the customer (i.e. per number of users license)

The user metric field specifies what attribute on the instance of the server is used for determining the number of licenses. For example, “smp” will count one license for each CPU/core in the virtual machine.

Example request:

GET /api/2.0/licenses/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "meta": {
        "limit": 20,
        "offset": 0,
        "total_count": 4
    },
    "objects": [
        {
            "burstable": false,
            "long_name": "SQL Server Enterprise Edition",
            "name": "msft_7jq_00341",
            "resource_uri": "/api/2.0/licenses/13/",
            "type": "instance",
            "user_metric": "smp"
        },
        {
            "burstable": false,
            "long_name": "SQL Server Standard Edition",
            "name": "msft_7nq_00302",
            "resource_uri": "/api/2.0/licenses/14/",
            "type": "instance",
            "user_metric": "smp"
        },
        {
            "burstable": true,
            "long_name": "Windows Server",
            "name": "msft_p73_04837_core",
            "resource_uri": "/api/2.0/licenses/12/",
            "type": "instance",
            "user_metric": "smp"
        },
        {
            "burstable": false,
            "long_name": "SQL Server Web",
            "name": "msft_tfa_00523",
            "resource_uri": "/api/2.0/licenses/15/",
            "type": "instance",
            "user_metric": "smp"
        }
    ]
}

Schema

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "allowed_detail_http_methods": [
        "get"
    ],
    "allowed_list_http_methods": [
        "get"
    ],
    "default_format": "application/json",
    "default_limit": 20,
    "fields": {
        "burstable": {
            "blank": false,
            "default": false,
            "help_text": "Whether this resource can be used on burst",
            "nullable": false,
            "readonly": false,
            "type": "boolean",
            "unique": false
        },
        "long_name": {
            "blank": false,
            "default": "",
            "help_text": "A human readable name for the resource.",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "name": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Name that should be used when purchasing",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": true
        },
        "resource_uri": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "type": {
            "blank": false,
            "default": "instance",
            "help_text": "Type of billing",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "user_metric": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "The metric that the user is charged for",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        }
    }
}