Skip to content

Integrating with a Billing System

MetalSoft records all deployment operations which include provisioning, edits changes of server type or VM type, deletions etc.

MetalSoft provides an API call POST api/v2/infrastructures/actions/get/resource-utilization-detailed to retrieve the resource utilization for a particular user in JSON format.

The following is an example output:

{
"detailed_report": {
"3668": {
"shared_drive":[
{
"cost": "0.23354152",
"cost_currency": "GBP",
"cost_per_unit": "0.00347222",
"end_timestamp": "2016-01-25T09:54:39Z",
"is_reservation": "0",
"measurement_period": 3600,
"measurement_unit": "seconds",
"product_id": 779,
"product_label": "new-shared-drive",
"product_subdomain": "new-shared-drive.test.1.integration.metalsoft.io",
"quantity: "242136",
"shared_drive_size_mbytes": 51200,
"start_timestamp": "2016-01-22T14:39:04Z"
}
],
"drive": [
{
"cost": "1.11383813",
"cost_currency": "GBP",
"cost_per_unit": "0.01601563",
"drive_size_mbytes": 41000,
"end_timestamp": "2016-02-04T10:31:03Z",
"is_reservation": "0",
"measurement_period": "3600",
"measurement_unit": "seconds",
"product_id": 3727,
"product_label": "drive-3727",
"product_subdomain": "drive-3727.new-drive-array.d-lake.1.integration.metalsoft.io",
"quantity": "250369",
"start_timestamp": "2016-02-01T12:58:15Z"
}
],
"instance": [
{
"cost": "7.25925278",
"cost_currency": "GBP",
"cost_per_unit": "0.31000000",
"end_timestamp": "2016-02-02T12:23:00Z",
"is_reservation": "0",
"measurement_period": "3600",
"measurement_unit": "seconds",
"product_id": 2416,
"product_label": "instance-2416",
"product_subdomain": "instance-2416.new-instance-array.d-lake.1.integration.metalsoft.io",
"quantity": "84301",
"server_type_id": null,
"start_timestamp": "2016-02-01T12:58:00Z"
}
],
"subnet": [
{
"cost": "0.00000000",
"cost_currency": "GBP",
"cost_per_unit": "0.00000000",
"end_timestamp": "2016-02-04T10:30:53Z",
"is_reservation": "0",
"measurement_period": "3600",
"measurement_unit": "seconds",
"product_id": 6378,
"product_label": "subnet-6378",
"product_subdomain": "subnet-6378.wan.d-lake.1.integration.metalsoft.io",
"quantity": "250376",
"start_timestamp": "2016-02-01T12:57:58Z",
"subnet_prefix_size": 64,
"subnet_type": "ipv6"
}
]
},
"network_report": {
"3688": {
"data_lake": {
"download": {
"cost": 0,
"cost_currency": "GBP",
"measurement_unit": "gbytes",
"quantity": 0,
"metered_waypoints": [
{
"cost": "0.00000000",
"cost_currency": "GBP",
"cost_per_unit": "0.00000000",
"end_timestamp": "2016-02-09T08:11:39Z",
"is_reservation": "0",
"measurement_period": "3600",
"measurement_unit": "gbytes",
"product_id": 8,
"product_label": "data-lake-8",
"product_subdomain": "data-lake-8.d-lake.1.integration.metalsoft.io",
"quantity": "0.0000",
"start_timestamp": "2016-02-01T13:10:05Z"
}
]
},
"upload": {
"cost": 0,
"cost_currency": "GBP",
"measurement_unit": "gbytes",
"quantity": 0,
"metered_waypoints": [
{
"cost": "0.00000000",
"cost_currency": "GBP",
"cost_per_unit": "0.06000000",
"end_timestamp": "2016-02-09T08:11:39Z",
"is_reservation": "0",
"measurement_period": "3600",
"measurement_unit": "gbytes",
"product_id": 8,
"product_label": "data-lake-8",
"product_subdomain": "data-lake-8.d-lake.1.integration.metalsoft.io",
"quantity": "0.0000",
"start_timestamp": "2016-02-01T13:10:06Z"
}
]
}
},
"network": {
"download": {
"cost": 0,
"cost_currency": "GBP",
"measurement_unit": "gbytes",
"quantity": 0,
"metered_waypoints": [
{
"cost": "0.00000000",
"cost_currency": "GBP",
"cost_per_unit": "0.00000000",
"end_timestamp": "2016-02-04T10:30:54Z",
"is_reservation": "0",
"measurement_period": "10800",
"measurement_unit": "gbytes",
"product_id": 8381,
"product_label": "wan",
"product_subdomain": "wan.d-lake.1.integration.metalsoft.io",
"quantity": "0.0000",
"start_timestamp": "2016-02-01T12:57:59Z"
}
]
},
"upload": {
"cost": 0,
"cost_currency": "GBP",
"measurement_unit": "gbytes",
"quantity": 0,
"metered_waypoints": [
{
"cost": "0.00000000",
"cost_currency": "GBP",
"cost_per_unit": "0.06000000",
"end_timestamp": "2016-02-04T10:30:54Z",
"is_reservation": "0",
"measurement_period": "10800",
"measurement_unit": "gbytes",
"product_id": 8381,
"product_label": "wan",
"product_subdomain": "wan.d-lake.1.integration.metalsoft.io",
"quantity": "0.0000",
"start_timestamp": "2016-02-01T12:57:59Z"
}
]
}
}
}
},