Add Columns

Adds columns to a dynamic table.

For common headers and authentication methods, see Access to the API. For sample scenarios, see API usage examples.

Request

POST

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

Path parameters

Name

Description

idx

Type: string<uuid4>

Dynamic table UUID. The value of idx is the same as the id field value in the response to POST /v1/grids, or results[].id in the response to GET /v1/pages/{idx}/grids. In /v1/pages/{idx}/grids, idx is the numeric page 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[]

The columns to add. Slugs must be unique within the table.

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

The insertion position, starting from zero. If omitted, columns are added to the end of the table.

revision

Type: string

The table version used as the basis for the changes.

Example: example

ColumnType

Data type of a dynamic table column.

Type: string

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

WidthUnits

Column width units.

Type: string

Enum: %, px

ColumnPinTypes

Side where the column is pinned.

Type: string

Enum: left, right

BGColor

Background color of a row or column.

Type: string

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

TextFormat

Text format:

  • yfm: Yandex Flavored Markdown.
  • wom: Wiki Old Markup (legacy markup).
  • plain: Plain text.

Type: string

Enum: yfm, wom, plain

TicketField

A Tracker issue field whose value is displayed in the column.

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

Schema for creating a new column in a dynamic table

Name

Description

required

Type: boolean

Whether the column is required

slug

Type: string

Unique text identifier of the column (used in formulas and the API)

Example: example

title

Type: string

Column title (displayed in the interface)

Min length: 1

Max length: 255

Example: example

type

All of 1 type
  • ColumnType

    Type: ColumnType

    Data type of a dynamic table column.

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

Column data type

Example: string

color

All of 1 type
  • BGColor

    Type: BGColor

    Background color of a row or column.

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

Column background color

Example: blue

description

Type: string

Column description

Max length: 1024

Example: example

format

All of 1 type
  • TextFormat

    Type: TextFormat

    Text format:

    • yfm: Yandex Flavored Markdown.
    • wom: Wiki Old Markup (legacy markup).
    • plain: Plain text.

    Enum: yfm, wom, plain

Only for string. The text format.

Example: yfm

id

Type: string

Unique column identifier

Example: example

mark_rows

Type: boolean

Only for checkbox. Marks the row as completed in the interface.

multiple

Type: boolean

Only for select and staff. Enables multiple selection.

pinned

All of 1 type
  • ColumnPinTypes

    Type: ColumnPinTypes

    Side where the column is pinned.

    Enum: left, right

Column pinning (left, right, or unpinned)

Example: left

select_options

Type: string[]

Only for select. Defines the available options.

Example
[
  "example"
]

ticket_field

All of 1 type
  • TicketField

    Type: TicketField

    A Tracker issue field whose value is displayed in the column.

    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

Only for ticket_field. A field of an issue in Yandex Tracker.

Example: assignee

width

Type: integer

Column width

width_units

All of 1 type
  • WidthUnits

    Type: WidthUnits

    Column width units.

    Enum: %, px

Column width units

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

Table revision after the operation.

Example: example