Add 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 |
Type: string ID of the row after which to place the rows. Takes precedence over position. Example: |
||
|
position |
Type: integer 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. |
||
|
revision |
Type: string The table version used as the basis for the changes. Example: |
UserIdentityExtended
Extended user identifier with additional fields
|
Name |
Description |
|
cloud_uid |
Type: string User identifier in Yandex Cloud Example: |
|
uid |
Type: string Yandex user ID Example: |
|
username |
Type: string User login Example: |
Example
{
"uid": "example",
"cloud_uid": "example",
"username": "example"
}
Responses
200 OK
OK
Body
application/json
{
"revision": "example",
"results": [
{
"id": "example",
"row": [
0
],
"pinned": true,
"color": "blue"
}
]
}
|
Name |
Description |
|
revision |
Type: string Table revision after the operation. Example: |
|
results |
Type: GridRowSchema[] 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 identifier
|
Name |
Description |
|
cloud_uid |
Type: string User identifier in the cloud Example: |
|
uid |
Type: string 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 |
All of 1 type
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 |
All of 1 type
User ID Example
|
|
username |
Type: string 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 10 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 |
All of 1 type
Row background color Example: |
|
pinned |
Type: boolean The row is pinned |
Example
{
"id": "example",
"row": [
0
],
"pinned": true,
"color": "blue"
}