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

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

Общие заголовки и способы аутентификации описаны в разделе Доступ к API. Примеры сценариев приведены в разделе Примеры использования API.

Request

POST

https://api.wiki.yandex.net/v1/grids/{idx}/columns

Path parameters

Name

Description

idx

Type: string<uuid4>

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

Example: ``

Body

application/json
{
  "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"
    }
  ]
}

Name

Description

columns

Type: NewColumnSchema[]

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

Example
[
  {
    "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"
  }
]

position

Type: integer

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

revision

Type: string

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

Example: example

ColumnType

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

Type: string

Enum: string, number, date, select, staff, checkbox, ticket, ticket_field

WidthUnits

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

Type: string

Enum: %, px

ColumnPinTypes

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

Type: string

Enum: left, right

BGColor

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

Type: string

Enum: blue, yellow, pink, red, green, mint, grey, orange, magenta, purple, copper, ocean

TextFormat

Формат текста:

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

Type: string

Enum: yfm, wom, plain

TicketField

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

Type: string

Enum: 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

NewColumnSchema

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

Name

Description

required

Type: boolean

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

slug

Type: string

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

Example: example

title

Type: string

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

Min length: 1

Max length: 255

Example: example

type

All of 1 type
  • ColumnType

    Type: ColumnType

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

    Enum: string, number, date, select, staff, checkbox, ticket, ticket_field

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

Example: string

color

All of 1 type
  • BGColor

    Type: BGColor

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

    Enum: blue, yellow, pink, red, green, mint, grey, orange, magenta, purple, copper, ocean

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

Example: blue

description

Type: string

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

Max length: 1024

Example: example

format

All of 1 type
  • TextFormat

    Type: TextFormat

    Формат текста:

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

    Enum: yfm, wom, plain

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

Example: yfm

id

Type: string

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

Example: example

mark_rows

Type: boolean

Только для checkbox. Отмечает строку как выполненную в интерфейсе.

multiple

Type: boolean

Только для select и staff. Включает множественный выбор.

pinned

All of 1 type
  • ColumnPinTypes

    Type: ColumnPinTypes

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

    Enum: left, right

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

Example: left

select_options

Type: string[]

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

Example
[
  "example"
]

ticket_field

All of 1 type
  • TicketField

    Type: TicketField

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

    Enum: 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

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

Example: assignee

width

Type: integer

Ширина столбца

width_units

All of 1 type
  • WidthUnits

    Type: WidthUnits

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

    Enum: %, px

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

Example: %

Example
{
  "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"
}

Responses

200 OK

OK

Body

application/json
{
  "revision": "example"
}

Name

Description

revision

Type: string

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

Example: example

Предыдущая