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 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
|
|
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: |
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: |
|
title |
Type: string Column title (displayed in the interface) Min length: Max length: Example: |
|
type |
All of 1 type
Column data type Example: |
|
color |
All of 1 type
Column background color Example: |
|
description |
Type: string Column description Max length: Example: |
|
format |
All of 1 type
Only for Example: |
|
id |
Type: string Unique column identifier Example: |
|
mark_rows |
Type: boolean Only for |
|
multiple |
Type: boolean Only for |
|
pinned |
All of 1 type
Column pinning (left, right, or unpinned) Example: |
|
select_options |
Type: string[] Only for Example
|
|
ticket_field |
All of 1 type
Only for Example: |
|
width |
Type: integer Column width |
|
width_units |
All of 1 type
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: |