Получить таблицу

Request

GET

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

Path parameters

Name

Description

idx

Type: string<uuid4>

Example: ``

Query parameters

Name

Description

fields

Type: string

Дополнительные поля, через запятую; см. описание формата ответа.

Example: ``

filter

Type: string

Отфильтровать строки; Например [slug] ~ wiki AND [slug2]<32

Example: ``

only_cols

Type: string

Вернуть только определенные колонки. Слаг через запятую

Example: ``

only_rows

Type: string

Вернуть только определенные ряды. ID через запятую

Example: ``

revision

Type: integer

Загрузить старую версию динамической таблицы

sort

Type: string

Отсортировать строки по колонкам; Например slug, -slug2, slug3

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: 2025-01-01T00:00:00Z

id

Any of 2 types
  • Type: string<uuid4>

    Example: example

  • Type: integer

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

Example: example

page

All of 1 type
  • PageIdentity

    Type: PageIdentity

    Идентификатор страницы

    Example
    {
      "id": 0,
      "slug": "example"
    }
    

Страница, к которой привязана таблица

Example
{
  "id": 0,
  "slug": "example"
}

revision

Type: string

Версия таблицы

Example: example

rich_text_format

All of 1 type
  • TextFormat

    Type: TextFormat

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

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

    Enum: yfm, wom, plain

Формат rich-text контента в таблице

Example: yfm

rows

Type: GridRowSchema[]

Строки таблицы

Example
[
  {
    "id": "example",
    "row": [
      0
    ],
    "pinned": true,
    "color": "blue"
  }
]

structure

All of 1 type
  • GridStructureSchema

    Type: GridStructureSchema

    Структура динамической таблицы

    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"
        }
      ]
    }
    

Структура таблицы (колонки, типы данных)

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"
    }
  ]
}

title

Type: string

Название таблицы

Example: example

attributes

All of 1 type
  • GridAttributesSchema

    Type: GridAttributesSchema

    Атрибуты динамической таблицы (метаданные)

    Example
    {
      "created_at": "2025-01-01T00:00:00Z",
      "modified_at": "2025-01-01T00:00:00Z"
    }
    

По умолчанию поле не возвращается
Укажите attributes в списке ?fields=attributes, ... для получения в ответе.
Возвращает дополнительные атрибуты динамической таблицы.

Example
{
  "created_at": "2025-01-01T00:00:00Z",
  "modified_at": "2025-01-01T00:00:00Z"
}

template_id

Type: integer

user_permissions

Type: UserPermission[]

По умолчанию поле не возвращается

Укажите user_permissions в списке ?fields=user_permissions, ... для получения в ответе.
Возвращает права доступа страницы, которой принадлежит динамическая таблица.

Example
[
  "create_page"
]

PageIdentity

Идентификатор страницы

Name

Description

id

Type: integer

ID страницы. Обязателен id либо slug, при передаче обоих id имеет приоритет и slug игнорируется

slug

Type: string

Адрес страницы (slug). Обязателен id либо slug

Example: example

Example
{
  "id": 0,
  "slug": "example"
}

SortDirection

Направление сортировки:

  • asc — по возрастанию (от меньшего к большему, от A до Z)
  • desc — по убыванию (от большего к меньшему, от Z до A)

Type: string

Enum: asc, desc

ColumnSortSchema

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

Name

Description

direction

All of 1 type
  • SortDirection

    Type: SortDirection

    Направление сортировки:

    • asc — по возрастанию (от меньшего к большему, от A до Z)
    • desc — по убыванию (от большего к меньшему, от Z до A)

    Enum: asc, desc

Направление сортировки

Example: asc

slug

Type: string

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

Example: example

title

Type: string

Название столбца

Example: 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 Markdown
  • wom — 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: example

title

Type: string

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

Example: example

type

All of 1 type
  • ColumnType

    Type: ColumnType

    An enumeration.

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

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

Example: string

color

All of 1 type
  • BGColor

    Type: BGColor

    An enumeration.

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

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

Example: blue

description

Type: string

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

Example: example

format

All of 1 type
  • TextFormat

    Type: TextFormat

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

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

    Enum: yfm, wom, plain

Только для text; Формат текста (None — текст без форматирования)

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

    An enumeration.

    Enum: left, right

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

Example: left

select_options

Type: string[]

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

Example
[
  "example"
]

ticket_field

All of 1 type
  • TicketField

    Type: TicketField

    An enumeration.

    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

    An enumeration.

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

GridStructureSchema

Структура динамической таблицы

Name

Description

columns

Type: ColumnSchema[]

Колонки таблицы

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"
  }
]

default_sort

Type: ColumnSortSchema[]

Сортировка по умолчанию

Example
[
  {
    "slug": "example",
    "title": "example",
    "direction": "asc"
  }
]
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

Ключ тикета (например, WIKI-123)

Example: example

resolved

Type: boolean

Тикет решён (закрыт)

Example
{
  "key": "example",
  "resolved": true
}

UserIdentity

Идентификатор пользователя

Name

Description

cloud_uid

Type: string

Идентификатор пользователя в облаке (для внешнего инстанса)

Example: example

uid

Type: string

Идентификатор пользователя в Яндекс (для внутреннего инстанса)

Example: example

Example
{
  "uid": "example",
  "cloud_uid": "example"
}

UserSchema

Информация о пользователе

Name

Description

affiliation

Type: string

Принадлежность пользователя (например, yandex, external)

Example: example

display_name

Type: string

Отображаемое имя пользователя

Example: example

id

Type: integer

Внутренний идентификатор пользователя

is_dismissed

Type: boolean

Пользователь уволен

username

Type: string

Логин пользователя

Example: example

identity

All of 1 type
  • UserIdentity

    Type: UserIdentity

    Идентификатор пользователя

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    

Идентификатор пользователя в системе

Example
{
  "uid": "example",
  "cloud_uid": "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
  • UserIdentity

    Type: UserIdentity

    Идентификатор пользователя

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    

Идентификатор пользователя

Example
{
  "uid": "example",
  "cloud_uid": "example"
}

username

Type: string

Логин пользователя

Example: example

Example
{
  "username": "example",
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  }
}

TrackerEnumField

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

Name

Description

display

Type: string

Отображаемое значение поля

Example: example

key

Type: string

Ключ значения поля

Example: example

Example
{
  "display": "example",
  "key": "example"
}

GridRowSchema

Схема строки динамической таблицы

Name

Description

id

Type: string

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

Example: example

row

Type: array
Any of 10 types
  • Type: integer

  • Type: number

  • Type: boolean

  • Type: string

    Example: example

  • TicketSchema

    Type: TicketSchema

    Схема тикета из Яндекс.Трекера

    Example
    {
      "key": "example",
      "resolved": true
    }
    
  • Type: string[]

    Example
    [
      "example"
    ]
    
  • Type: array
    Any of 2 types
    • UserSchema

      Type: UserSchema

      Информация о пользователе

      Example
      {
        "id": 0,
        "identity": {
          "uid": "example",
          "cloud_uid": "example"
        },
        "username": "example",
        "display_name": "example",
        "is_dismissed": true,
        "affiliation": "example"
      }
      
    • UnresolvedUserSchema

      Type: UnresolvedUserSchema

      Схема пользователя, который не был найден в системе

      Example
      {
        "username": "example",
        "identity": {
          "uid": "example",
          "cloud_uid": "example"
        }
      }
      
    Example
    [
      {
        "id": 0,
        "identity": {
          "uid": "example",
          "cloud_uid": "example"
        },
        "username": "example",
        "display_name": "example",
        "is_dismissed": true,
        "affiliation": "example"
      }
    ]
    
  • UserSchema

    Type: UserSchema

    Информация о пользователе

    Example
    {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    }
    
  • UnresolvedUserSchema

    Type: UnresolvedUserSchema

    Схема пользователя, который не был найден в системе

    Example
    {
      "username": "example",
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      }
    }
    
  • TrackerEnumField

    Type: TrackerEnumField

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

    Example
    {
      "display": "example",
      "key": "example"
    }
    

Массив значений ячеек строки (порядок соответствует порядку столбцов)

Example
[
  0
]

color

All of 1 type
  • BGColor

    Type: BGColor

    An enumeration.

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

Цвет фона строки

Example: blue

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: 2025-01-01T00:00:00Z

modified_at

Type: string<date-time>

Дата и время последнего изменения таблицы

Example: 2025-01-01T00:00:00Z

Example
{
  "created_at": "2025-01-01T00:00:00Z",
  "modified_at": "2025-01-01T00:00:00Z"
}