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 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 7 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"
      }
    ]
    
  • Type: null

    Example: null

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

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

ID of the row after which to place the rows. Takes precedence over position.

Example: example

position

Any of 2 types
  • Type: integer

  • Type: null

    Example: null

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

revision

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

The table version used as the basis for the changes.

Example: example

UserIdentityExtended

Extended user identifier with additional fields

Name

Description

cloud_uid

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

User identifier in Yandex Cloud

Example: example

uid

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Yandex user ID

Example: example

username

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

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": [
        null
      ],
      "pinned": true,
      "color": "blue"
    }
  ]
}

Name

Description

revision

Type: string

Table revision after the operation.

Example: example

results

Any of 2 types
  • Type: GridRowSchema[]

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

    Example: null

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 ID

Name

Description

cloud_uid

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

User identifier in the cloud

Example: example

uid

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

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

Any of 2 types
  • UserIdentity

    Type: UserIdentity

    User ID

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    
  • Type: null

    Example: null

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

Any of 2 types
  • UserIdentity

    Type: UserIdentity

    User ID

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    
  • Type: null

    Example: null

User ID

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

username

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

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 11 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": null,
          "cloud_uid": null
        },
        "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"
    }
    
  • Type: null

    Example: null

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

Any of 2 types
  • BGColor

    Type: BGColor

    Background color of a row or column.

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

  • Type: null

    Example: null

Row background color

Example: blue

pinned

Any of 2 types
  • Type: boolean

  • Type: null

    Example: null

The row is pinned

Example: true

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