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 idx is the same as the id field value in the response to POST /v1/grids, or results[].id in the response to GET /v1/pages/{idx}/grids. In /v1/pages/{idx}/grids, idx is the numeric page ID.

Example: ``

Body

application/json
{
  "revision": "example",
  "position": 0,
  "after_row_id": "example",
  "rows": [
    {}
  ]
}

Name

Description

rows

Type: object[]

[additional]

Any of 6 types
  • Type: integer

  • Type: number

  • Type: boolean

  • Type: string

    Example: example

  • Type: string[]

    Example
    [
      "example"
    ]
    
  • Type: UserIdentityExtended[]

    Example
    [
      {
        "uid": "example",
        "cloud_uid": "example",
        "username": "example"
      }
    ]
    

Example: 0

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: 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: example

UserIdentityExtended

Extended user identifier with additional fields

Name

Description

cloud_uid

Type: string

User identifier in Yandex Cloud

Example: example

uid

Type: string

Yandex user ID

Example: example

username

Type: string

User login

Example: 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: example

results

Type: GridRowSchema[]

The added rows with their assigned IDs.

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

TicketSchema

Yandex Tracker issue schema

Name

Description

key

Type: string

Issue key (for example, WIKI-123)

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: example

uid

Type: string

Yandex user ID

Example: example

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

UserSchema

User information

Name

Description

affiliation

Type: string

User affiliation

Example: example

display_name

Type: string

User display name

Example: example

id

Type: integer

Internal user identifier

is_dismissed

Type: boolean

The user is dismissed

username

Type: string

User login

Example: example

identity

All of 1 type
  • UserIdentity

    Type: UserIdentity

    User identifier

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

User identifier in the system

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

Schema for a user that was not found in the system

Name

Description

identity

All of 1 type
  • UserIdentity

    Type: UserIdentity

    User identifier

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

User ID

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

username

Type: string

User login

Example: 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: example

key

Type: string

Field value key

Example: 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: example

row

Type: array
Any of 10 types
  • Type: integer

  • Type: number

  • Type: boolean

  • Type: string

    Example: example

  • TicketSchema

    Type: TicketSchema

    Yandex Tracker issue schema

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

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

      Type: UserSchema

      User information

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

      Type: UnresolvedUserSchema

      Schema for a user that was not found in the system

      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

    User information

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

    Type: UnresolvedUserSchema

    Schema for a user that was not found in the system

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

    Type: TrackerEnumField

    Enum field from Yandex Tracker

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

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
[
  0
]

color

All of 1 type
  • BGColor

    Type: BGColor

    Background color of a row or column.

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

Row background color

Example: blue

pinned

Type: boolean

The row is pinned

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