Reference

Usage and unit economics by usage type

Returns spend, billable quantity, unit, and derived cost per unit grouped by usage type.

GET
/api/v1/costs/usage

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

provider?Provider
start?string|null
end?string|null
service?array<string>|

Google Cloud only: limit to these services

family?|

Google Cloud only: limit to one SKU family and return its categories

credits?Credits

Cost basis for Google Cloud: after credits (default) or before them. AWS stays on its invoiced basis.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/costs/usage"
{
  "success": true,
  "timestamp": "2019-08-24T14:15:22Z",
  "data": {
    "items": [
      {
        "usage_type": "string",
        "cost": 0,
        "usage_amount": 0,
        "unit": "string",
        "cost_per_unit": 0,
        "service": "string",
        "services": [
          "string"
        ],
        "family": "string",
        "category": "string",
        "sku_id": "string",
        "gross_cost": 0
      }
    ],
    "total_cost": 0,
    "categories": [
      {
        "category": "string",
        "cost": 0,
        "usage_amount": 0,
        "unit": "string"
      }
    ],
    "credits": "before"
  }
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
Ask the FinOps Agent about your cloud spend