---
title: "Manually recalculate a scenario's metadata"
method: POST
path: "/v1/org/{orgId}/scenario/{scenarioId}/recalculate-metadata"
tags: ["scenario"]
---

# Manually recalculate a scenario's metadata

`POST /v1/org/{orgId}/scenario/{scenarioId}/recalculate-metadata`

## Request

- Base URL: `https://localhost`
- URL: `https://localhost/v1/org/{orgId}/scenario/{scenarioId}/recalculate-metadata`
- Auth: none declared
- TypeScript: <https://skmtc.dev/charthop/apis/charthop-api/docs/v1/org/:orgId/scenario/:scenarioId/recalculate-metadata/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `orgId` string, required
- `scenarioId` string, required

## Response `200`

successful operation

- ScenarioMetadata
  - `scenarioId` string, required: scenario id
  - `changeCount` integer: number of changes contained in scenario
  - `jobCount` integer: number of job changes contained in scenario
  - `access` ResultsAccess[], required: access information on the user for the entity
    - `ids` string[]
    - `allowed` AccessAction[], required
      - `action` string, required
      - `fields` string[]
      - `types` string[]
  - `canChange` boolean, required: whether user can edit the scenario
  - `cost` CostImpact
    - `annual` number, required: total annual run-rate impact
    - `firstMonth` string, required: first month to be affected
    - `months` number[], required: impact to each month, starting at firstMonth
    - `basis` 'ANNUALIZED' | 'PERIOD_TOTAL', required: the basis this cost is measured on
  - `budgetImpacts` ScenarioBudgetImpact[], required: summary of scenario impact on budgets
    - `budgetId` string, required
    - `budgetLabel` string, required
    - `budgetColor` string
    - `primaryUsage` Money, required
      - `amount` number, required
      - `currency` string, required
      - `places` integer
    - `scenarioUsage` Money, required
      - `amount` number, required
      - `currency` string, required
      - `places` integer
    - `amount` Money, required
      - `amount` number, required
      - `currency` string, required
      - `places` integer
    - `basis` 'ANNUALIZED' | 'PERIOD_TOTAL', required: effective cost basis these usage numbers are measured on
  - `changeAt` string: most recent time the scenario was changed
  - `calcEndAt` string: most recent summary calculation ended at timestamp

## Other responses

- `400`: bad request
- `401`: not authorized
- `404`: not found

---

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