Documentation

Showback (Cost Attribution)

Showback is the practice of slicing your total cloud bill by the organizational unit that incurred it — by team, by tag, or by both. ZopNight builds showback from the same daily cost records that power Reports.

Where the numbers come from

The team list is computed from daily cost records when you ask for it. Tag reports, and the team resources and trends endpoints, read a daily allocation snapshot of those same records. Accepted smart tags are layered in for resources whose owners haven't tagged them yet.

By Team

Team attribution is derived from resource-team assignments, including resources a team owns through a resource group. Cost that belongs to no team is not a row in items. It is reported in unattributedCostUsd and unattributedCount.

GET
/reports/teams

List cost per team for the selected period.

Responsejson
{
  "data": {
    "items": [
      {
        "teamId": "team_001",
        "teamName": "Platform",
        "allocatedCostUsd": 4200.5,
        "allocatedSavingsUsd": 310.25,
        "resourceCount": 42,
        "percentOfTotal": 33.7
      }
    ],
    "totalOrgCostUsd": 12450.5,
    "totalOrgSavingsUsd": 480.0,
    "unattributedCostUsd": 312.0,
    "unattributedCount": 14,
    "byProvider": { "aws": 9800.5, "gcp": 2650.0 },
    "byResourceType": { "vm": 6100.0, "rds": 2200.0 },
    "period": "2026-09",
    "hasBilling": true,
    "costSourceLabel": "Unblended Cost"
  }
}

Query params: period (YYYY-MM, defaults to the current month), or from and to (YYYY-MM-DD, at most 366 days apart). Sort with sortBy (cost, savings, resourceCount, name) and sortOrder (asc or desc, default desc). The response may also carry a costDataMeta block that says how fresh the data is. costSourceLabel is explained on Billing.

Shared resources

A resource that belongs to more than one team is split evenly. With three owning teams, each team's allocatedCostUsd gets one third of its cost. The per-resource drilldown returns the full costUsd, the team's allocatedCostUsd, and shareCount.
GET
/reports/teams/{teamID}

Per-team breakdown by provider and resource type.

GET
/reports/teams/{teamID}/resources

Per-resource cost for a team — used for the drilldown table.

GET
/reports/teams/trends

Daily / weekly / monthly trend series for all teams.

Team anomaly dots

When cost anomaly detection finds a spike attributed to a specific team, the showback trend chart displays a pulsing severity-coloured dot on the affected day. Clicking the dot opens the anomaly detail panel with root cause analysis and affected resources. The team detector filters out cross-team redistribution (resource retagging) so only genuine cost growth triggers anomalies.

By Tag

Tag attribution covers cloud-native tags (AWS tags, GCP labels, Azure tags) plus accepted smart tags. Each row's tagSource says where the tag came from: cloud, auto, inherited, or mixed. Untagged cost is reported separately in untaggedCostUsd and untaggedCount.

GET
/reports/tags

List tag keys with attributed cost. Used to build the tag-key picker.

Responsejson
{
  "data": {
    "items": [
      {
        "tagKey": "Environment",
        "tagSource": "cloud",
        "costUsd": 9800.5,
        "savingsUsd": 360.0,
        "resourceCount": 128,
        "valueCount": 4
      }
    ],
    "totalCostUsd": 12450.5,
    "totalSavingsUsd": 480.0,
    "taggedCostUsd": 12138.5,
    "untaggedCostUsd": 312.0,
    "untaggedCount": 14,
    "period": "2026-09",
    "hasBilling": true,
    "costSourceLabel": "Unblended Cost"
  }
}

Keys-mode takes the same period, from, to, sortBy and sortOrder params as the team list. Without page and limit it returns every key. With them it returns one page plus total, page and limit. Add includeValues=true to inline each key's values, byProvider and byResourceType for that page, so you don't need one GET /reports/tags/{tagKey} call per key.

GET
/reports/tags/{tagKey}

List tag values for a key with their attributed cost.

GET
/reports/tags/{tagKey}/values/{tagValue}/resources

List resources carrying a given tag value with their per-resource cost.

GET
/reports/tags/trends

Daily / weekly / monthly trend series filtered by tag key, value, provider, or type.

Coverage & Reconciliation

  • Tagged vs. untagged. untaggedCostUsd and untaggedCount show how much cost carries no tag. Low coverage usually means tags are inconsistent across accounts — Smart Tags can close the gap.
  • Reconcile to org total. In the team list, the sum of every team's allocatedCostUsd plus unattributedCostUsd equals totalOrgCostUsd. The teams alone match it only when nothing is unattributed. percentOfTotal is measured against totalOrgCostUsd, so team percentages leave out the unattributed share.
  • Billed spend with no resource. With billing connected, charges that match no discovered resource (tax, support, data transfer, undiscovered services) can't be assigned to a team. They land in unattributedCostUsd. See Billing.
  • Teams vs. tags. The team list reads cost records live. Tag reports read the daily snapshot. The two totals can differ until the snapshot catches up.
  • Days not built yet. If some days in the window haven't been broken down by tag or team yet, tag endpoints and the team resources and trends endpoints return 409. They fill in automatically overnight.
  • Time alignment. period=YYYY-MM uses calendar month boundaries — not deploy-day or your fiscal calendar. For fiscal-month views, pass from and to, or export and re-aggregate downstream.

For exports of these reports as CSV/JSON, use the POST /reports/export endpoint documented in Reports & Analytics.