---
title: "Get the per-project cost rollup"
method: GET
path: "/costs"
tags: ["Costs"]
---

# Get the per-project cost rollup

`GET /costs`

## Request

- Base URL: `https://api.marboba.com/v1`
- URL: `https://api.marboba.com/v1/costs`
- Auth: HTTP bearer

Returns the trailing-30-day cost rollup for one project, including MTD spend, prev-30d for MoM delta, top 5 services, and a 30-bucket daily series for the chart on Project Overview.

## Query parameters

- `appId` string, required

## Response `200`

Cost rollup

- object
  - `cost` CostRollup: Per-project cost rollup over the trailing 30 days plus MTD totals. All amounts are in cents (USD by default).
    - `appId` string, required
    - `mtdCents` integer, required: Spend so far this calendar month.
    - `last30dCents` integer, required
    - `prev30dCents` integer, required
    - `byCategory` object: Cents by CostCategory over the last 30 days.
    - `byService` object: Cents by service string over the last 30 days.
    - `topServices` object[]: Top 5 services by spend (descending).
      - `service` string
      - `cents` integer
    - `dailySeries` integer[]: 30 daily totals in cents, oldest-first (index 0 is 29 days ago).
    - `periodStart` string, date-time
    - `periodEnd` string, date-time

## Other responses

- `400` (unresolved $ref)

---

[API](https://skmtc.dev/marboba/apis/marboba-public-rest-api.md) · [All operations](https://skmtc.dev/marboba/apis/marboba-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/marboba/apis/marboba-public-rest-api/revisions/5b96d525d88d?raw)
