Cloud Sustainability API

The Cloud sustainability API endpoint can be used to retrieve sustainability metrics.

End Point Detail

Sustainability metrics follow all the API functionality supported by the Cost Reporting Endpoint . For sustainability metrics information, we are adding two new metrics: carbon_emissions and kwh_consumption

Example Sustainability Report Object

Retrieve a list of sustainability metrics by performing a GET request at the reporting endpoint.

Example Request

curl 'https://api.cloudability.com/v3/reporting/cost/run?start_date=2024-08-01&end_date=2024-08-28&dimensions=region&metrics=total_amortized_cost,carbon_emissions,kwh_consumption&filters=region[]%3Dus-east-1,us-west-2’ -u ‘[auth_token]

Example Response

 {
  "results": [
   {
     "total_adjusted_amortized_cost": "2373216.34",
      "vendor": "Amazon"
    },
    {
     "total_adjusted_amortized_cost": "80700.35",
      "vendor": "Azure"
    },
    {
     "total_adjusted_amortized_cost": "13239.26",
      "vendor": "GCP"
   }
 ],
      "meta": {
       "dates": {
       "start": "2024-07-01T00:00:00Z",
       "end": "2024-09-30T00:00:00Z"
      },
       "filters": [],
     "metrics": [
                    {
 "name": "total_adjusted_amortized_cost",
 "label": "Cost (Adjusted Amortized)",
 "description": "Built from the cost (amortized) metric, this metric adjusts the figures to allow for any custom pricing rules. It only appears for Cloudability customers who have turned on the custom pricing module.",
   "data_type": "currency",
   "type": "metric",
   "group": {
   "ID": 2,
    "Key": "billing",
    "Name": "Billing"
    },
    "sub_group": {
    "ID": 3,
    "Key": "costs",
    "Name": "Costs"
    }
   }
   ],
   "dimensions": [
   {
   "name": "vendor",
   "label": "Vendor",
   "description": "The cloud vendor associated with the cost item. Valid values are Amazon, Azure, GCP and OCI.",
   "data_type": "string",
   "type": "dimension",
   "group": {
    "ID": 2,
    "Key": "billing",
    "Name": "Billing"
    },
    "sub_group": {
    "ID": 7,
    "Key": "vendor",
    "Name": "Vendor"
    }
    }
   ],
   "aggregates": [
   {
   "name": "total_adjusted_amortized_cost",
   "label": "Cost (Adjusted Amortized)",
   "description": "Built from the cost (amortized) metric, this metric adjusts the figures to allow for any custom pricing rules. It only appears for Cloudability customers who have turned on the custom pricing module.",
    "data_type": "currency",
    "type": "metric",
    "value": "2467155.95"
     }
    ]
   },
   "offset": 0,
   "pagination": {},
   "limit": 0,
   "total_results": 3
 }