---
title: "List table changes in a development branch"
method: GET
path: "/v2/storage/branch/{branchId}/changes/tables"
tags: ["Development Branches"]
---

# List table changes in a development branch

`GET /v2/storage/branch/{branchId}/changes/tables`

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/branch/{branchId}/changes/tables`
- Auth: one of:
  - API key in header `X-StorageApi-Token`
  - API key in header `X-KBC-ManageApiToken`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/keboola/apis/keboola-storage-api/docs/v2/storage/branch/:branchId/changes/tables/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists the tables of a [Development Branch](#tag/Development-Branches) whose schema differs from production: tables that are new in the branch, and tables whose columns, column types, primary key or column order changed. The branch is compared with production (the default branch) as it is **now**, not as it was when a table was pulled into the branch, so a column added in production after the pull is reported as removed in the branch.

Tables are matched by ID and columns by name, byte for byte, so a column whose name differs only in case is reported as removed and added. A column type change is a change of `type`, `length` or `nullable`. The column order counts as changed when a column present on both sides moved; columns appended at the end of the branch table do not count. Tables whose schema is equal on both sides are omitted, and so are tables that cannot be compared: tables of linked, external or read-only buckets, aliases, and tables whose production bucket the token cannot read. Entries are ordered by table ID.

`changeType` is `new` or `modified`. `deleted` is reserved for a later version and never returned by this one.

Only available in development branches of projects with branched storage.

## Path parameters

- `branchId` string, required

## Response `200`

Tables that are new or modified in the branch.

- TableChangesListResponse: Tables of the development branch that are new or modified compared with production as it is now, ordered by table ID. Tables whose schema is equal on both sides, and tables that cannot be compared, are omitted.
  - `tables` TableChangeResponse[], required
    - `id` string, required: Table ID, the same on both sides.
    - `name` string, required: Table name in the branch.
    - `displayName` string, required: Table display name in the branch.
    - `bucket` object, required: The bucket of the branch table.
      - `id` string, required
      - `name` string, required
      - `displayName` string, required
    - `changeType` 'new' | 'modified' | 'deleted', required: `new` when production has no table with this ID, `modified` when the schemas differ. `deleted` is reserved for a later version and never returned by this one.
    - `isTyped` boolean, required: Whether the branch table is typed. When only one side is typed, every shared column with a definition on the typed side is in `changes.typeChangedColumns`, with `null` on the untyped side.
    - `summary` object, required: Counts derived from the changes. For a `new` table `addedColumns` is its column count and the rest is zero or false.
      - `addedColumns` integer, required
      - `removedColumns` integer, required
      - `typeChangedColumns` integer, required
      - `primaryKeyChanged` boolean, required
      - `columnOrderChanged` boolean, required
    - `columns` TableChangeColumnResponse[]: Present for `new` only: every column of the branch table in branch order.
      - `name` string, required: Column name exactly as stored on that side. Names are matched byte for byte, so a column whose name differs only in case is reported as removed and added.
      - `definition` ColumnDefinitionResponse, required: The part of a column definition that changes how data loads into the column. Default value and description are not part of it.
        - `type` string, required: Backend data type as stored, for example `NUMBER` on Snowflake or `NUMERIC` on BigQuery.
        - `length` string, nullable, required: Length or precision as stored; `null` when none is set.
        - `nullable` boolean, required: Whether the column accepts `NULL`; `true` when not stored.
    - `primaryKey` string[]: Present for `new` only: the primary-key column names of the branch table in stored order.
    - `changes` TableSchemaChangesResponse: How the branch table differs from production. All five keys are always present: a list is empty and an object is `null` when that kind of change is absent.
      - `addedColumns` TableChangeColumnResponse[], required: Columns in the branch and not in production, in branch order, with the branch definition.
        - `name` string, required: Column name exactly as stored on that side. Names are matched byte for byte, so a column whose name differs only in case is reported as removed and added.
        - `definition` ColumnDefinitionResponse, required: The part of a column definition that changes how data loads into the column. Default value and description are not part of it.
          - `type` string, required: Backend data type as stored, for example `NUMBER` on Snowflake or `NUMERIC` on BigQuery.
          - `length` string, nullable, required: Length or precision as stored; `null` when none is set.
          - `nullable` boolean, required: Whether the column accepts `NULL`; `true` when not stored.
      - `removedColumns` TableChangeColumnResponse[], required: Columns in production and not in the branch, in production order, with the production definition.
        - `name` string, required: Column name exactly as stored on that side. Names are matched byte for byte, so a column whose name differs only in case is reported as removed and added.
        - `definition` ColumnDefinitionResponse, required: The part of a column definition that changes how data loads into the column. Default value and description are not part of it.
          - `type` string, required: Backend data type as stored, for example `NUMBER` on Snowflake or `NUMERIC` on BigQuery.
          - `length` string, nullable, required: Length or precision as stored; `null` when none is set.
          - `nullable` boolean, required: Whether the column accepts `NULL`; `true` when not stored.
      - `typeChangedColumns` object[], required: Columns on both sides whose `type`, `length` or `nullable` differs, in branch order. When only one side has a definition, the other side is `null`.
        - `name` string, required: Column name.
        - `production` ColumnDefinitionResponse, required: The part of a column definition that changes how data loads into the column. Default value and description are not part of it.
          - `type` string, required: Backend data type as stored, for example `NUMBER` on Snowflake or `NUMERIC` on BigQuery.
          - `length` string, nullable, required: Length or precision as stored; `null` when none is set.
          - `nullable` boolean, required: Whether the column accepts `NULL`; `true` when not stored.
        - `branch` ColumnDefinitionResponse, required: The part of a column definition that changes how data loads into the column. Default value and description are not part of it.
          - `type` string, required: Backend data type as stored, for example `NUMBER` on Snowflake or `NUMERIC` on BigQuery.
          - `length` string, nullable, required: Length or precision as stored; `null` when none is set.
          - `nullable` boolean, required: Whether the column accepts `NULL`; `true` when not stored.
      - `primaryKey` object, nullable, required: Primary-key column names of each side in stored order; `null` when the two ordered lists are equal.
        - `production` string[], required
        - `branch` string[], required
      - `columnOrder` ColumnOrderChangeResponse, required: The column order of both sides. Reported when a column present on both sides is at a different position: columns appended at the end of the branch table do not count, a column removed from the middle does, because every column after it moves.
        - `production` string[], required: All production column names in production order, removed columns included.
        - `branch` string[], required: All branch column names in branch order, added columns included.
        - `columns` object[], required: Every column of either side with its position on each side: shared and added columns in branch order, then removed columns in production order.
          - `name` string, required: Column name.
          - `productionPosition` integer, nullable, required: 1-based position of the column in production; `null` when the column is not in production.
          - `branchPosition` integer, nullable, required: 1-based position of the column in the branch; `null` when the column is not in the branch.

## Other responses

- `400`: Called on the default branch (`storage.tables.changesNotAvailableOnDefaultBranch`), or the project has no branched storage (`storage.tables.changesRequireBranchedStorage`).
- `404`: The development branch does not exist in the project.

---

[API](https://skmtc.dev/keboola/apis/keboola-storage-api.md) - [All operations](https://skmtc.dev/keboola/apis/keboola-storage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keboola/apis/keboola-storage-api/revisions/34b5ceac0317?raw)
