---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://yandex.ru/support/wiki/en/api-ref/grids/grids__add_columns.md
  - https://yandex.ru/support/wiki/ru/api-ref/grids/grids__add_columns.md
  - href: https://yandex.ru/support/wiki/ru/api-ref/grids/grids__add_columns.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/support/wiki/ru/llms.txt?revision=r22094953
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/wiki/ru/llms.txt?revision=r22094953

<div class="openapi">

# Добавить столбцы

<!-- markdownlint-disable-file -->

Добавляет столбцы в динамическую таблицу.

Общие заголовки и способы аутентификации описаны в разделе [Доступ к API](https://yandex.ru/support/wiki/ru/api-ref/access.md#headers). Примеры сценариев приведены в разделе [Примеры использования API](https://yandex.ru/support/wiki/ru/api-ref/examples.md).

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api.wiki.yandex.net/v1/grids/{idx}/columns
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_idx_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid4&gt;

UUID динамической таблицы. Значение `idx` совпадает со значением поля `id` в ответе `POST /v1/grids` или поля `results[].id` в ответе `GET /v1/pages/{idx}/grids`. В `/v1/pages/{idx}/grids` параметр `idx` — числовой ID страницы.

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "revision": "example",
  "position": 0,
  "columns": [
    {
      "id": "example",
      "slug": "example",
      "title": "example",
      "type": "string",
      "required": true,
      "width": 0,
      "width_units": "%",
      "pinned": "left",
      "color": "blue",
      "multiple": true,
      "format": "yfm",
      "ticket_field": "assignee",
      "select_options": [
        "example"
      ],
      "mark_rows": true,
      "description": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_columns_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [NewColumnSchema](#entity-NewColumnSchema)[]

Добавляемые столбцы. Слаги должны быть уникальными в таблице.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "id": "example",
    "slug": "example",
    "title": "example",
    "type": "string",
    "required": true,
    "width": 0,
    "width_units": "%",
    "pinned": "left",
    "color": "blue",
    "multiple": true,
    "format": "yfm",
    "ticket_field": "assignee",
    "select_options": [
      "example"
    ],
    "mark_rows": true,
    "description": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_position_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Позиция вставки, считая с нуля. Если поле не передано, столбцы добавляются в конец таблицы.
{.table-cell}
||
||

_revision_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Базовая версия таблицы, на основе которой подготовлены изменения.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### ColumnType {#entity-ColumnType}

Тип данных столбца динамической таблицы.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `string`, `number`, `date`, `select`, `staff`, `checkbox`, `ticket`, `ticket_field`

</div>

<div class="openapi-entity">

### WidthUnits {#entity-WidthUnits}

Единицы измерения ширины столбца.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `%`, `px`

</div>

<div class="openapi-entity">

### ColumnPinTypes {#entity-ColumnPinTypes}

Сторона, с которой закреплен столбец.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `left`, `right`

</div>

<div class="openapi-entity">

### BGColor {#entity-BGColor}

Цвет фона строки или столбца.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `blue`, `yellow`, `pink`, `red`, `green`, `mint`, `grey`, `orange`, `magenta`, `purple`, `copper`, `ocean`

</div>

<div class="openapi-entity">

### TextFormat {#entity-TextFormat}

Формат текста:
- `yfm` — Yandex Flavored Markdown
- `wom` — Wiki Old Markup (старая разметка)
- `plain` — простой текст

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `yfm`, `wom`, `plain`

</div>

<div class="openapi-entity">

### TicketField {#entity-TicketField}

Поле задачи Яндекс Трекера, значение которого отображается в столбце.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `assignee`, `components`, `created_at`, `deadline`, `description`, `end`, `estimation`, `fixversions`, `followers`, `last_comment_updated_at`, `original_estimation`, `parent`, `pending_reply_from`, `priority`, `project`, `queue`, `reporter`, `resolution`, `resolved_at`, `sprint`, `start`, `status`, `status_start_time`, `status_type`, `storypoints`, `subject`, `tags`, `type`, `updated_at`, `votes`

</div>

<div class="openapi-entity">

### NewColumnSchema {#entity-NewColumnSchema}

Схема для создания нового столбца в динамической таблице

#|
|| **Name** | **Description** ||
||

_required_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Обязательность заполнения столбца
{.table-cell}
||
||

_slug_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный текстовый идентификатор столбца (используется в формулах и API)

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_title_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Название столбца (отображается в интерфейсе)

_Min length:_{.json-schema-reset .json-schema-assertion} `1`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **ColumnType**

  **Type**: [ColumnType](#entity-ColumnType)

  Тип данных столбца динамической таблицы.

  _Enum:_{.json-schema-reset .json-schema-value} `string`, `number`, `date`, `select`, `staff`, `checkbox`, `ticket`, `ticket_field`

{% endcut %}

Тип данных столбца

_Example:_{.json-schema-reset .json-schema-example} `string`
{.table-cell}
||
||

_color_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **BGColor**

  **Type**: [BGColor](#entity-BGColor)

  Цвет фона строки или столбца.

  _Enum:_{.json-schema-reset .json-schema-value} `blue`, `yellow`, `pink`, `red`, `green`, `mint`, `grey`, `orange`, `magenta`, `purple`, `copper`, `ocean`

{% endcut %}

Цвет фона столбца

_Example:_{.json-schema-reset .json-schema-example} `blue`
{.table-cell}
||
||

_description_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Описание столбца

_Max length:_{.json-schema-reset .json-schema-assertion} `1024`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_format_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **TextFormat**

  **Type**: [TextFormat](#entity-TextFormat)

  Формат текста:
  - `yfm` — Yandex Flavored Markdown
  - `wom` — Wiki Old Markup (старая разметка)
  - `plain` — простой текст

  _Enum:_{.json-schema-reset .json-schema-value} `yfm`, `wom`, `plain`

{% endcut %}

Только для `string`. Формат текста.

_Example:_{.json-schema-reset .json-schema-example} `yfm`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Уникальный идентификатор столбца

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_mark_rows_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Только для `checkbox`. Отмечает строку как выполненную в интерфейсе.
{.table-cell}
||
||

_multiple_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Только для `select` и `staff`. Включает множественный выбор.
{.table-cell}
||
||

_pinned_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **ColumnPinTypes**

  **Type**: [ColumnPinTypes](#entity-ColumnPinTypes)

  Сторона, с которой закреплен столбец.

  _Enum:_{.json-schema-reset .json-schema-value} `left`, `right`

{% endcut %}

Закрепление столбца (слева, справа или без закрепления)

_Example:_{.json-schema-reset .json-schema-example} `left`
{.table-cell}
||
||

_select_options_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

Только для `select`. Задает варианты выбора.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_ticket_field_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **TicketField**

  **Type**: [TicketField](#entity-TicketField)

  Поле задачи Яндекс Трекера, значение которого отображается в столбце.

  _Enum:_{.json-schema-reset .json-schema-value} `assignee`, `components`, `created_at`, `deadline`, `description`, `end`, `estimation`, `fixversions`, `followers`, `last_comment_updated_at`, `original_estimation`, `parent`, `pending_reply_from`, `priority`, `project`, `queue`, `reporter`, `resolution`, `resolved_at`, `sprint`, `start`, `status`, `status_start_time`, `status_type`, `storypoints`, `subject`, `tags`, `type`, `updated_at`, `votes`

{% endcut %}

Только для `ticket_field`. Поле задачи из Яндекс Трекера.

_Example:_{.json-schema-reset .json-schema-example} `assignee`
{.table-cell}
||
||

_width_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Ширина столбца
{.table-cell}
||
||

_width_units_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **WidthUnits**

  **Type**: [WidthUnits](#entity-WidthUnits)

  Единицы измерения ширины столбца.

  _Enum:_{.json-schema-reset .json-schema-value} `%`, `px`

{% endcut %}

Единицы измерения ширины столбца

_Example:_{.json-schema-reset .json-schema-example} `%`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example",
  "title": "example",
  "type": "string",
  "required": true,
  "width": 0,
  "width_units": "%",
  "pinned": "left",
  "color": "blue",
  "multiple": true,
  "format": "yfm",
  "ticket_field": "assignee",
  "select_options": [
    "example"
  ],
  "mark_rows": true,
  "description": "example"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "revision": "example"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_revision_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Версия таблицы после выполнения операции.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.