Adding rows
Before adding rows, create columns using POST /v1/grids/{idx}/columns.
Pass an array of objects in rows. Each object defines one row: keys are the slug values of existing columns, and values are cell contents. Each value must match the column type.
For example, for the id (number) and name (string) columns, send the following request body:
{
"rows": [
{
"id": 1,
"name": "One"
},
{
"id": 2,
"name": "Two"
}
]
}
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}/rows
Path parameters
|
Name |
Description |
|
idx |
Type: string<uuid4> Dynamic table UUID. The value of Example: `` |
Body
application/json
{
"revision": "example",
"position": 0,
"after_row_id": "example",
"rows": [
{}
]
}
|
Name |
Description |
||
|
rows |
Type: object[]
Rows to add. Each row is an object whose keys are existing column slugs and whose values are cell data. An empty object creates an empty row. A nonempty row must include values for all required columns. Example
|
||
|
after_row_id |
Any of 2 types
ID of the row after which to place the rows. Takes precedence over position. Example: |
||
|
position |
Any of 2 types
Zero-based insertion position. Used if after_row_id is not specified. If neither field is provided, rows are placed at the end of the table. Example: |
||
|
revision |
Any of 2 types
The table version used as the basis for the changes. Example: |
UserIdentityExtended
Extended user identifier with additional fields
|
Name |
Description |
|
cloud_uid |
Any of 2 types
User identifier in Yandex Cloud Example: |
|
uid |
Any of 2 types
Yandex user ID Example: |
|
username |
Any of 2 types
User login Example: |
Example
{
"uid": "example",
"cloud_uid": "example",
"username": "example"
}
Responses
200 OK
OK
Body
application/json
{
"revision": "example",
"results": [
{
"id": "example",
"row": [
null
],
"pinned": true,
"color": "blue"
}
]
}
|
Name |
Description |
|
revision |
Type: string Table revision after the operation. Example: |
|
results |
Any of 2 types
The added rows with their assigned IDs. Example
|
TicketSchema
Yandex Tracker issue schema
|
Name |
Description |
|
key |
Type: string Issue key (for example, Example: |
|
resolved |
Type: boolean The issue is resolved (closed). |
Example
{
"key": "example",
"resolved": true
}
UserIdentity
User ID
|
Name |
Description |
|
cloud_uid |
Any of 2 types
User identifier in the cloud Example: |
|
uid |
Any of 2 types
Yandex user ID Example: |
Example
{
"uid": "example",
"cloud_uid": "example"
}
UserSchema
User information
|
Name |
Description |
|
affiliation |
Type: string User affiliation Example: |
|
display_name |
Type: string User display name Example: |
|
id |
Type: integer Internal user identifier |
|
is_dismissed |
Type: boolean The user is dismissed |
|
username |
Type: string User login Example: |
|
identity |
Any of 2 types
User identifier in the system Example
|
Example
{
"id": 0,
"identity": {
"uid": "example",
"cloud_uid": "example"
},
"username": "example",
"display_name": "example",
"is_dismissed": true,
"affiliation": "example"
}
UnresolvedUserSchema
Schema for a user that was not found in the system
|
Name |
Description |
|
identity |
Any of 2 types
User ID Example
|
|
username |
Any of 2 types
User login Example: |
Example
{
"username": "example",
"identity": {
"uid": "example",
"cloud_uid": "example"
}
}
TrackerEnumField
Enum field from Yandex Tracker
|
Name |
Description |
|
display |
Type: string Displayed value of the field Example: |
|
key |
Type: string Field value key Example: |
Example
{
"display": "example",
"key": "example"
}
BGColor
Background color of a row or column.
Type: string
Enum: blue, yellow, pink, red, green, mint, grey, orange, magenta, purple, copper, ocean
GridRowSchema
Dynamic table row schema
|
Name |
Description |
|
id |
Type: string Unique row identifier Example: |
|
row |
Type: arrayAny of 11 types
Row cell values. When retrieving a table, their order matches the column order. When adding rows, only the provided values are returned, in the order of the keys in the request object. Example
|
|
color |
Any of 2 types
Row background color Example: |
|
pinned |
Any of 2 types
The row is pinned Example: |
Example
{
"id": "example",
"row": [
0
],
"pinned": true,
"color": "blue"
}