Создать таблицу
Создать новую динамическую таблицу как ресурс страницы.
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 Обязателен |
|
slug |
Type: string 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": "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"
}
]
},
"rich_text_format": null,
"rows": [
{
"id": "example",
"row": [
0
],
"pinned": true,
"color": null
}
],
"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 |
Type: PageIdentity Example
|
|
revision |
Type: string Example: |
|
rich_text_format |
Type: TextFormat An enumeration. Enum: |
|
rows |
Type: GridRowSchema[] Example
|
|
structure |
Type: GridStructureSchema Example
|
|
title |
Type: string Example: |
|
attributes |
All of 1 type
По умолчанию поле не возвращается Example
|
|
template_id |
Type: integer |
|
user_permissions |
Type: UserPermission[] По умолчанию поле не возвращается Возвращает права доступа страницы, которой принадлежит динамическая таблица. Example
|
SortDirection
An enumeration.
Type: string
Enum: asc, desc
ColumnSortSchema
|
Name |
Description |
|
direction |
Type: SortDirection An enumeration. Enum: |
|
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
An enumeration.
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 Example: |
|
title |
Type: string Example: |
|
type |
Type: ColumnType An enumeration. Enum: |
|
color |
Type: BGColor An enumeration. Enum: |
|
description |
Type: string Описание Example: |
|
format |
All of 1 type
Только для Example: |
|
id |
Type: string Example: |
|
mark_rows |
Type: boolean Только для |
|
multiple |
Type: boolean Только для |
|
pinned |
Type: ColumnPinTypes An enumeration. Enum: |
|
select_options |
Type: string[] Только для Example
|
|
ticket_field |
All of 1 type
Только для Example: |
|
width |
Type: integer |
|
width_units |
Type: WidthUnits An enumeration. Enum: |
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 |
|
display_name |
Type: string Example: |
|
id |
Type: integer |
|
is_dismissed |
Type: boolean |
|
username |
Type: string Example: |
|
identity |
Type: UserIdentity Example
|
Example
{
"id": 0,
"identity": {
"uid": "example",
"cloud_uid": "example"
},
"username": "example",
"display_name": "example",
"is_dismissed": true
}
UnresolvedUserSchema
|
Name |
Description |
|
identity |
Type: UserIdentity 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 |
Type: BGColor An enumeration. Enum: |
|
pinned |
Type: boolean |
Example
{
"id": "example",
"row": [
0
],
"pinned": true,
"color": "blue"
}
UserPermission
An enumeration.
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"
}
No longer supported, please use an alternative and newer version.