Skip to main content
POST
/
cost-insights
/
data
Get cost data
curl --request POST \
  --url https://api.cloudcapital.co/v1/cost-insights/data \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filters": {
    "inclusions": {
      "dateRange": {
        "start": "2026-01-01",
        "end": "2026-03-31"
      },
      "accountIds": [
        "123456789012"
      ]
    }
  },
  "groupBy": {
    "dimension": "account",
    "dateGrouping": "monthly"
  }
}
'
{
  "data": {
    "items": [
      {
        "usage_date": "2026-01-15",
        "dimension_value": "<string>",
        "dimension_values": {},
        "amortized_cost": 123,
        "billed_cost": 123,
        "cash_cost": 123,
        "on_demand_cost": 123,
        "total_savings": 123,
        "enterprise_discount_savings": 123,
        "product_discount_savings": 123,
        "partner_discount_savings": 123,
        "commitment_savings": 123,
        "spot_savings": 123,
        "other_savings": 123
      }
    ],
    "summary": {
      "total_amortized_cost": 123,
      "total_billed_cost": 123,
      "total_cash_cost": 123,
      "total_on_demand_cost": 123,
      "total_savings": 123,
      "total_enterprise_discount_savings": 123,
      "total_product_discount_savings": 123,
      "total_partner_discount_savings": 123,
      "total_commitment_savings": 123,
      "total_spot_savings": 123,
      "total_other_savings": 123,
      "effective_savings_rate": 123
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.cloudcapital.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication. Generate an API key from your Cloud Capital dashboard under Settings > API keys. Include it in the Authorization header as a Bearer token.

Body

application/json
groupBy
object
required

Grouping configuration. dateGrouping is required and controls the time-series granularity. Optionally specify dimension for single-dimension grouping or dimensions for multi-dimension.

filters
object

Filter container supporting both inclusion and exclusion criteria. Use inclusions to narrow results to matching data and exclusions to remove matching data from results.

Response

Cost data retrieved successfully

Successful HTTP responses wrap the endpoint-specific body in data. Each operation's 200 response schema is this object merged (allOf) with a data property referencing the payload schema for that endpoint.

success
enum<boolean>
required

Always true when the HTTP status is 2xx.

Available options:
true
data
object
required