---
title: "Create report from showback"
method: POST
path: "/v1/cost-allocation/{id}/reports"
tags: ["Cost allocation"]
---

# Create report from showback

`POST /v1/cost-allocation/{id}/reports`

## Request

- Base URL: `https://api.nops.io`
- URL: `https://api.nops.io/v1/cost-allocation/{id}/reports`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nops/apis/nops-public-api/docs/v1/cost-allocation/:id/reports/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a saved Explorer report pre-scoped to this showback (groupBy and the showback overlay are derived automatically). Optional `config` overrides costType, granularity, date range, and filters. Defaults to the last 30 days when no date is given.

## Path parameters

- `id` string, required: Showback ID

## Headers

- `Idempotency-Key` string, required: Unique key for safe retries on write requests (required, max 64 characters).

## Request body

- object
  - `name` string, required
  - `scope` 'private' | 'shared' | 'global'
  - `config` object
    - `dateRange` object
      - `start` string, required
      - `end` string, required
    - `dateRangeMode` 'rolling' | 'fixed'
    - `datePreset` '7D' | '14D' | '30D' | '60D' | '90D' | '1M' | '3M' | '6M' | '1Y' | '3Y' | 'MTD' | 'YTD' | '1Y+MTD' | '+0M' | '+1M' | '+3M' | '+6M' | '+1Y' | '+3Y' | '+4Y'
    - `groupBy` string
    - `costType` 'line_item_unblended_cost' | 'line_item_amortized_cost' | 'line_item_blended_cost' | 'pricing_public_on_demand_cost' | 'nops_line_item_net_unblended_cost' | 'nops_line_item_net_amortized_cost' | 'nops_pricing_net_public_on_demand_cost'
    - `granularity` 'hour' | 'day' | 'week' | 'month' | 'quarter'
    - `filters` object[]
      - `dimension` string, required
      - `mode` 'include' | 'exclude', required
      - `values` string[], required
      - `valueModes` object
      - `texts` object[]
        - `mode` 'include' | 'exclude', required
        - `text` string, required
      - `textCombinator` 'and' | 'or'
      - `keyCombinator` 'and' | 'or'
      - `tagKeyOnly` boolean
      - `includePreAttributionHistory` true
    - `tagKeyCombinators` object
    - `topN` integer, nullable
    - `usageChart` 'Hide' | 'Usage' | 'Normalized Usage'
    - `widgetChartView` 'all' | 'spend' | 'usage'
    - `widgetTargetChartView` 'all' | 'spend' | 'target'
    - `widgetBusinessUnitChartView` 'all' | 'spend' | 'unit'
    - `page` integer
    - `pageSize` integer, nullable
    - `sortColumn` union
      - 'name' | 'total' | 'lastPeriod' | 'periodChange'
      - string
    - `sortDir` 'asc' | 'desc'
    - `nameSearch` string
    - `budgetOverlay` object, nullable
      - `budgetId` string, required
      - `enabled` boolean, required
    - `bueOverlay` object, nullable
      - `economicsId` integer, required
      - `enabled` boolean, required
    - `showbackOverlay` object, nullable
      - `showbackId` integer, required
      - `enabled` boolean, required
      - `dimension` string, nullable
      - `grouping` 'allocation' | 'dimension'
      - `valueFilter` object, nullable
        - `mode` 'include' | 'exclude', required
        - `values` string[], required
        - `valueModes` object
      - `dataSource` 'live' | 'processed' | 'force_processed'
      - `drilldownGroupBy` string, nullable
    - `heatmap` object, nullable
      - `enabled` boolean, required
      - `xAxis` string, required
      - `yAxis` string, required
    - `forecastHorizon` integer
    - `bypassCache` boolean
    - `flexTable` object, nullable
      - `customColumns` object[], required
        - `id` string, required
        - `dimension` string, required
        - `label` string, required
        - `tagKey` string

## Response `201`

Creates a saved Explorer report pre-scoped to this showback (groupBy and the showback overlay are derived automatically). Optional `config` overrides costType, granularity, date range, and filters. Defaults to the last 30 days when no date is given.

- PublicApiError
  - `error` object, required
    - `code` string, required
    - `message` string, required
    - `request_id` string, required

## Other responses

- `401`: Unauthorized — invalid or missing API key
- `403`: Forbidden — insufficient permissions or entitlement

---

[API](https://skmtc.dev/nops/apis/nops-public-api.md) - [All operations](https://skmtc.dev/nops/apis/nops-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nops/apis/nops-public-api/revisions/ac549fa495dd?raw)
