---
title: "Update VariableTable"
method: PATCH
path: "/variables/tables/{variable_table_id}"
tags: ["VariableTable"]
---

# Update VariableTable

`PATCH /variables/tables/{variable_table_id}`

Used to update existing an existing variable table

## Path parameters

- `variable_table_id` string, required

## Headers

- `If-Match` string

## Request body

- VariableTableUpdateRequest
  - `prototype` VariableTable
    - `id` string
    - `organization_id` string — The ID of the organization associated with this VariableTable
    - `name` string — The display name for the VariableTable
    - `description` string, nullable — The description for the VariableTable
    - `row_ids` string[] — The ordered IDs of the rows in the Variable table
    - `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
    - `resource_groups` DerivedResourceGroup[] — Resource groups this resource belongs to
      - `resource_group_id` string — ID of the resource group
      - `short_name` string — Name of the resource group
      - `parent_id` string — ID of the parent to which this ResourceGroup belongs
      - `parent_namespace` 'workspaces' — Namespace of the parent to which this ResourceGroup belongs
  - `updatedRows` VariableRow[]
    - `id` string — The ID of the VariableRow
    - `table_id` string — The ID of the VariableRow's parent table
    - `row` Variable[]
      - `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 VariableRow was created
    - `created_by_id` string — The ID of the user who created this VariableRow
    - `last_updated_time` integer — Time at which the VariableRow was last updated
    - `last_updated_by_id` string — The ID of the user who last updated this VariableRow
    - `organization_id` string — The ID of the organization associated with this VariableRow
    - `scenario_id` string — The ID of the particular scenario to differentiate between rows in a VariableTable
  - `deletedRowIds` string[]
  - `addedRows` VariableRow[]
    - `id` string — The ID of the VariableRow
    - `table_id` string — The ID of the VariableRow's parent table
    - `row` Variable[]
      - `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 VariableRow was created
    - `created_by_id` string — The ID of the user who created this VariableRow
    - `last_updated_time` integer — Time at which the VariableRow was last updated
    - `last_updated_by_id` string — The ID of the user who last updated this VariableRow
    - `organization_id` string — The ID of the organization associated with this VariableRow
    - `scenario_id` string — The ID of the particular scenario to differentiate between rows in a VariableTable

## Response `200`

The updated VariableTable

- VariableTable
  - `id` string
  - `organization_id` string — The ID of the organization associated with this VariableTable
  - `name` string — The display name for the VariableTable
  - `description` string, nullable — The description for the VariableTable
  - `row_ids` string[] — The ordered IDs of the rows in the Variable table
  - `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
  - `resource_groups` DerivedResourceGroup[] — Resource groups this resource belongs to
    - `resource_group_id` string — ID of the resource group
    - `short_name` string — Name of the resource group
    - `parent_id` string — ID of the parent to which this ResourceGroup belongs
    - `parent_namespace` 'workspaces' — Namespace of the parent to which this ResourceGroup belongs

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Environment 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)
