---
title: "Update Scenario"
method: PUT
path: "/dataTables/scenarios/{scenario_id}"
tags: ["DataTable"]
---

# Update Scenario

`PUT /dataTables/scenarios/{scenario_id}`

Update a scenario and/or its variable values

## Path parameters

- `scenario_id` string, required

## Request body

- Scenario
  - `id` string
  - `table_id` string — The ID of the DataTable parent table
  - `workspace_id` string — The ID of the workspace associated with this DataTable
  - `name` string — The display name for the scenario
  - `variables` Variable[] — The variable names and values for this scenario. All scenarios must have the same set of variable names to maintain consistency.
    - `name` string — The variable name
    - `value` string — The value associated with the variable defined in the "name" field
  - `created_time` integer — Time at which the entity was created
  - `created_by_id` string — The ID of the user who created this entity
  - `last_updated_time` integer — Time at which the entity was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this entity

## Response `200`

The updated Scenario

- Scenario
  - `id` string
  - `table_id` string — The ID of the DataTable parent table
  - `workspace_id` string — The ID of the workspace associated with this DataTable
  - `name` string — The display name for the scenario
  - `variables` Variable[] — The variable names and values for this scenario. All scenarios must have the same set of variable names to maintain consistency.
    - `name` string — The variable name
    - `value` string — The value associated with the variable defined in the "name" field
  - `created_time` integer — Time at which the entity was created
  - `created_by_id` string — The ID of the user who created this entity
  - `last_updated_time` integer — Time at which the entity was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this entity

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — DataTable not found
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
