Создать таблицу
Создать новую динамическую таблицу как ресурс страницы.
Request
POST
https://api.wiki.yandex.net/v1/grids
Body
application/json
{
"title": "example",
"page": {
"id": 0,
"slug": "example"
}
}
|
Name |
Description |
|
page |
Type: PageIdentity Идентификатор страницы Example
|
|
title |
Type: string Min length: Max length: Example: |
PageIdentity
Идентификатор страницы
|
Name |
Description |
|
id |
Type: integer ID страницы. Обязателен |
|
slug |
Type: string Адрес страницы (slug). Обязателен Example: |
Example
{
"id": 0,
"slug": "example"
}
Responses
200 OK
OK
Body
application/json
{
"id": "example",
"created_at": "2025-01-01T00:00:00Z",
"title": "example",
"page": {
"id": 0,
"slug": "example"
},
"structure": {
"default_sort": [
{
"slug": "example",
"title": "example",
"direction": null
}
],
"columns": [
{
"id": "example",
"slug": "example",
"title": "example",
"type": null,
"required": true,
"width": 0,
"width_units": null,
"pinned": null,
"color": null,
"multiple": true,
"format": null,
"ticket_field": null,
"select_options": [
null
],
"mark_rows": true,
"description": "example"
}
]
},
"rich_text_format": "yfm",
"rows": [
{
"id": "example",
"row": [
0
],
"pinned": true,
"color": "blue"
}
],
"revision": "example",
"user_permissions": [
"create_page"
],
"attributes": {
"created_at": "2025-01-01T00:00:00Z",
"modified_at": "2025-01-01T00:00:00Z"
},
"template_id": 0
}
|
Name |
Description |
|
created_at |
Type: string<date-time> Дата и время создания таблицы Example: |
|
id |
Any of 2 types
Уникальный идентификатор таблицы Example: |
|
page |
All of 1 type
Страница, к которой привязана таблица Example
|
|
revision |
Type: string Версия таблицы Example: |
|
rich_text_format |
All of 1 type
Формат rich-text контента в таблице Example: |
|
rows |
Type: GridRowSchema[] Строки таблицы Example
|
|
structure |
All of 1 type
Структура таблицы (колонки, типы данных) Example
|
|
title |
Type: string Название таблицы Example: |
|
attributes |
All of 1 type
По умолчанию поле не возвращается Example
|
|
template_id |
Type: integer |
|
user_permissions |
Type: UserPermission[] По умолчанию поле не возвращается Укажите Example
|
SortDirection
Направление сортировки:
asc— по возрастанию (от меньшего к большему, от A до Z)desc— по убыванию (от большего к меньшему, от Z до A)
Type: string
Enum: asc, desc
ColumnSortSchema
Схема сортировки столбца в динамической таблице
|
Name |
Description |
|
direction |
All of 1 type
Направление сортировки Example: |
|
slug |
Type: string Уникальный текстовый идентификатор столбца Example: |
|
title |
Type: string Название столбца Example: |
Example
{
"slug": "example",
"title": "example",
"direction": "asc"
}
ColumnType
An enumeration.
Type: string
Enum: string, number, date, select, staff, checkbox, ticket, ticket_field
WidthUnits
An enumeration.
Type: string
Enum: %, px
ColumnPinTypes
An enumeration.
Type: string
Enum: left, right
BGColor
An enumeration.
Type: string
Enum: blue, yellow, pink, red, green, mint, grey, orange, magenta, purple, copper, ocean
TextFormat
Формат текста:
yfm— Yandex Flavored Markdownwom— Wiki Old Markup (старая разметка)plain— простой текст
Type: string
Enum: yfm, wom, plain
TicketField
An enumeration.
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
ColumnSchema
Схема столбца динамической таблицы
|
Name |
Description |
|
required |
Type: boolean Обязательность заполнения столбца |
|
slug |
Type: string Уникальный текстовый идентификатор столбца (используется в формулах и API) Example: |
|
title |
Type: string Название столбца (отображается в интерфейсе) Example: |
|
type |
All of 1 type
Тип данных столбца Example: |
|
color |
All of 1 type
Цвет фона столбца Example: |
|
description |
Type: string Описание столбца Example: |
|
format |
All of 1 type
Только для Example: |
|
id |
Type: string Уникальный идентификатор столбца Example: |
|
mark_rows |
Type: boolean Только для |
|
multiple |
Type: boolean Только для |
|
pinned |
All of 1 type
Закрепление столбца (слева, справа или без закрепления) Example: |
|
select_options |
Type: string[] Только для Example
|
|
ticket_field |
All of 1 type
Только для Example: |
|
width |
Type: integer Ширина столбца |
|
width_units |
All of 1 type
Единицы измерения ширины столбца 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"
}
GridStructureSchema
Структура динамической таблицы
|
Name |
Description |
|
columns |
Type: ColumnSchema[] Колонки таблицы Example
|
|
default_sort |
Type: ColumnSortSchema[] Сортировка по умолчанию Example
|
Example
{
"default_sort": [
{
"slug": "example",
"title": "example",
"direction": "asc"
}
],
"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"
}
]
}
TicketSchema
Схема тикета из Яндекс.Трекера
|
Name |
Description |
|
key |
Type: string Ключ тикета (например, Example: |
|
resolved |
Type: boolean Тикет решён (закрыт) |
Example
{
"key": "example",
"resolved": true
}
UserIdentity
Идентификатор пользователя
|
Name |
Description |
|
cloud_uid |
Type: string Идентификатор пользователя в облаке (для внешнего инстанса) Example: |
|
uid |
Type: string Идентификатор пользователя в Яндекс (для внутреннего инстанса) Example: |
Example
{
"uid": "example",
"cloud_uid": "example"
}
UserSchema
Информация о пользователе
|
Name |
Description |
|
affiliation |
Type: string Принадлежность пользователя (например, Example: |
|
display_name |
Type: string Отображаемое имя пользователя Example: |
|
id |
Type: integer Внутренний идентификатор пользователя |
|
is_dismissed |
Type: boolean Пользователь уволен |
|
username |
Type: string Логин пользователя Example: |
|
identity |
All of 1 type
Идентификатор пользователя в системе Example
|
Example
{
"id": 0,
"identity": {
"uid": "example",
"cloud_uid": "example"
},
"username": "example",
"display_name": "example",
"is_dismissed": true,
"affiliation": "example"
}
UnresolvedUserSchema
Схема пользователя, который не был найден в системе
|
Name |
Description |
|
identity |
All of 1 type
Идентификатор пользователя Example
|
|
username |
Type: string Логин пользователя Example: |
Example
{
"username": "example",
"identity": {
"uid": "example",
"cloud_uid": "example"
}
}
TrackerEnumField
Поле перечисления из Яндекс.Трекера
|
Name |
Description |
|
display |
Type: string Отображаемое значение поля Example: |
|
key |
Type: string Ключ значения поля Example: |
Example
{
"display": "example",
"key": "example"
}
GridRowSchema
Схема строки динамической таблицы
|
Name |
Description |
|
id |
Type: string Уникальный идентификатор строки Example: |
|
row |
Type: arrayAny of 10 types
Массив значений ячеек строки (порядок соответствует порядку столбцов) Example
|
|
color |
All of 1 type
Цвет фона строки Example: |
|
pinned |
Type: boolean Строка закреплена |
Example
{
"id": "example",
"row": [
0
],
"pinned": true,
"color": "blue"
}
UserPermission
Права доступа пользователя к странице:
create_page— создание подстраницdelete— удаление страницыedit— редактирование страницыview— просмотр страницыcomment— комментированиеchange_authors— изменение авторовchange_acl— изменение списка доступаset_redirect— установка редиректаmanage_invite— управление приглашениямиview_invite— просмотр приглашенийadmin— административные права
Type: string
Enum: create_page, delete, edit, view, comment, change_authors, change_acl, set_redirect, manage_invite, view_invite, admin
GridAttributesSchema
Атрибуты динамической таблицы (метаданные)
|
Name |
Description |
|
created_at |
Type: string<date-time> Дата и время создания таблицы Example: |
|
modified_at |
Type: string<date-time> Дата и время последнего изменения таблицы Example: |
Example
{
"created_at": "2025-01-01T00:00:00Z",
"modified_at": "2025-01-01T00:00:00Z"
}