Добавить контент

Request

POST

https://api.wiki.yandex.net/v1/pages/{idx}/append-content

Path parameters

Name

Description

idx

Type: integer

Query parameters

Name

Description

fields

Type: string

Example: ``

is_silent

Type: boolean

Default: false

Body

application/json
{
  "content": "example",
  "body": {
    "location": "top"
  },
  "section": {
    "id": 0,
    "location": null
  },
  "anchor": {
    "name": "example",
    "fallback": false,
    "regex": false
  }
}

Name

Description

content

Type: string

Min length: 1

Example: example

anchor

Type: PageAppendContentAnchorSchema

Example
{
  "name": "example",
  "fallback": false,
  "regex": false
}

body

Type: PageAppendContentBodySchema

Example
{
  "location": "top"
}

section

Type: PageAppendContentSectionSchema

Example
{
  "id": 0,
  "location": "top"
}

Location

An enumeration.

Type: string

Enum: top, bottom

PageAppendContentBodySchema

Name

Description

location

Type: Location

An enumeration.

Enum: top, bottom

Example
{
  "location": "top"
}

PageAppendContentSectionSchema

Name

Description

id

Type: integer

location

Type: Location

An enumeration.

Enum: top, bottom

Example
{
  "id": 0,
  "location": "top"
}

PageAppendContentAnchorSchema

Name

Description

name

Type: string

Example: example

fallback

Type: boolean

Default: false

regex

Type: boolean

Default: false

Example
{
  "name": "example",
  "fallback": false,
  "regex": false
}

Responses

200 OK

OK

Body

application/json
{
  "id": 0,
  "slug": "example",
  "title": "example",
  "page_type": "page",
  "redirect": {
    "page_id": 0,
    "redirect_target": {
      "id": 0,
      "slug": "example",
      "title": "example",
      "page_type": null
    }
  },
  "breadcrumbs": [
    {
      "id": 0,
      "title": "example",
      "slug": "example",
      "page_exists": true
    }
  ],
  "attributes": {
    "created_at": "2025-01-01T00:00:00Z",
    "modified_at": "2025-01-01T00:00:00Z",
    "lang": "example",
    "is_readonly": true,
    "comments_count": 0,
    "comments_enabled": true,
    "keywords": [
      "example"
    ],
    "is_collaborative": true,
    "is_draft": true
  },
  "content": {
    "embed": {
      "iframe_src": "example",
      "edit_src": "example"
    },
    "acl_management": "unknown",
    "type": "docx",
    "filename": "example",
    "error": "example"
  }
}

Name

Description

id

Type: integer

page_type

Type: PageType

An enumeration.

Enum: page, grid, cloud_page, wysiwyg, template

slug

Type: string

Example: example

title

Type: string

Example: example

attributes

All of 1 type
  • PageAttributesSchema

    Type: PageAttributesSchema

    Example
    {
      "created_at": "2025-01-01T00:00:00Z",
      "modified_at": "2025-01-01T00:00:00Z",
      "lang": "example",
      "is_readonly": true,
      "comments_count": 0,
      "comments_enabled": true,
      "keywords": [
        "example"
      ],
      "is_collaborative": true,
      "is_draft": true
    }
    

По умолчанию поле не возвращается
Укажите attributes в списке ?fields=attributes, ... для получения в ответе.

Example
{
  "created_at": "2025-01-01T00:00:00Z",
  "modified_at": "2025-01-01T00:00:00Z",
  "lang": "example",
  "is_readonly": true,
  "comments_count": 0,
  "comments_enabled": true,
  "keywords": [
    "example"
  ],
  "is_collaborative": true,
  "is_draft": true
}

breadcrumbs

Type: BreadcrumbSchema[]

По умолчанию поле не возвращается
Укажите breadcrumbs в списке ?fields=breadcrumbs, ... для получения в ответе.

Example
[
  {
    "id": 0,
    "title": "example",
    "slug": "example",
    "page_exists": true
  }
]

content

Any of 3 types
  • CloudPageContentSchema

    Type: CloudPageContentSchema

    Example
    {
      "embed": {
        "iframe_src": "example",
        "edit_src": "example"
      },
      "acl_management": "unknown",
      "type": "docx",
      "filename": "example",
      "error": "example"
    }
    
  • LegacyGridSchema

    Type: LegacyGridSchema

    Example
    {
      "rows": [
        [
          {
            "row_id": "example",
            "col_id": "example",
            "raw": null,
            "sort": null,
            "url": "example",
            "status": null,
            "transformed": null
          }
        ]
      ],
      "structure": {
        "title": "example",
        "sorting": [
          {
            "type": "asc",
            "name": "example"
          }
        ],
        "fields": [
          {
            "type": "string",
            "id": "example",
            "title": "",
            "width": "example",
            "width_units": "example",
            "multiple": true,
            "options": [
              "example"
            ],
            "mark_row_if_checked": true,
            "format": "example"
          }
        ]
      },
      "version": "example"
    }
    
  • Type: string

    Example: example

По умолчанию поле не возвращается
Укажите content в списке ?fields=content, ... для получения в ответе.
Разный для разных типов страницы:

  • page, wysiwygstr
  • cloud_pageCloudPageContentSchema
  • gridGridContentSchema (legacy, для фронтенда Wiki там всегда null)
Example
{
  "embed": {
    "iframe_src": "example",
    "edit_src": "example"
  },
  "acl_management": "unknown",
  "type": "docx",
  "filename": "example",
  "error": "example"
}

redirect

All of 1 type
  • RedirectSchema

    Type: RedirectSchema

    Example
    {
      "page_id": 0,
      "redirect_target": {
        "id": 0,
        "slug": "example",
        "title": "example",
        "page_type": "page"
      }
    }
    

По умолчанию поле не возвращается
Укажите redirect в списке ?fields=redirect, ... для получения в ответе.
Если редиректа нет, вернется null

Example
{
  "page_id": 0,
  "redirect_target": {
    "id": 0,
    "slug": "example",
    "title": "example",
    "page_type": "page"
  }
}

PageType

An enumeration.

Type: string

Enum: page, grid, cloud_page, wysiwyg, template

PageDetailsSchema

Name

Description

id

Type: integer

page_type

Type: PageType

An enumeration.

Enum: page, grid, cloud_page, wysiwyg, template

slug

Type: string

Example: example

title

Type: string

Example: example

Example
{
  "id": 0,
  "slug": "example",
  "title": "example",
  "page_type": "page"
}

RedirectSchema

Name

Description

page_id

Type: integer

ID страницы, на которую перенаправляет текущая страница.

redirect_target

All of 1 type
  • PageDetailsSchema

    Type: PageDetailsSchema

    Example
    {
      "id": 0,
      "slug": "example",
      "title": "example",
      "page_type": "page"
    }
    

Если есть цепочка редиректов A->B->C->D, для A,B и С, это будет страница D.

Example
{
  "id": 0,
  "slug": "example",
  "title": "example",
  "page_type": "page"
}
Example
{
  "page_id": 0,
  "redirect_target": {
    "id": 0,
    "slug": "example",
    "title": "example",
    "page_type": "page"
  }
}

BreadcrumbSchema

Name

Description

page_exists

Type: boolean

slug

Type: string

Example: example

title

Type: string

Example: example

id

Type: integer

Example
{
  "id": 0,
  "title": "example",
  "slug": "example",
  "page_exists": true
}

PageAttributesSchema

Name

Description

comments_count

Type: integer

comments_enabled

Type: boolean

created_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

is_readonly

Type: boolean

lang

Type: string

Example: example

modified_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

is_collaborative

Type: boolean

is_draft

Type: boolean

keywords

Type: string[]

Example
[
  "example"
]
Example
{
  "created_at": "2025-01-01T00:00:00Z",
  "modified_at": "2025-01-01T00:00:00Z",
  "lang": "example",
  "is_readonly": true,
  "comments_count": 0,
  "comments_enabled": true,
  "keywords": [
    "example"
  ],
  "is_collaborative": true,
  "is_draft": true
}

CloudPageEmbeddingSchema

Name

Description

edit_src

Type: string

URL для открытия в новом окне для редактирования документа в MS365

Example: example

iframe_src

Type: string

SRC для iframe

Example: example

Example
{
  "iframe_src": "example",
  "edit_src": "example"
}

Ms365AclManagementType

An enumeration.

Type: string

Enum: unknown, unmanaged, wiki

Ms365DocType

An enumeration.

Type: string

Enum: docx, pptx, xlsx

CloudPageContentSchema

Name

Description

acl_management

Type: Ms365AclManagementType

An enumeration.

Enum: unknown, unmanaged, wiki

embed

Type: CloudPageEmbeddingSchema

Example
{
  "iframe_src": "example",
  "edit_src": "example"
}

filename

Type: string

Example: example

type

Type: Ms365DocType

An enumeration.

Enum: docx, pptx, xlsx

error

Type: string

Example: example

Example
{
  "embed": {
    "iframe_src": "example",
    "edit_src": "example"
  },
  "acl_management": "unknown",
  "type": "docx",
  "filename": "example",
  "error": "example"
}

LegacyCellSchema

Name

Description

col_id

Type: string

Соответствует column.id в structure; В apiv1 поле называлось __key__

Example: example

row_id

Type: string

Example: example

raw

Type: unknown

Сырое значение;

Example: null

sort

Type: unknown

Вспомогательное поле, будет использоваться при сортировке колонки

Example: null

status

Type: unknown

Для типа ticket, удалось ли получить данные

Example: null

transformed

Type: unknown

Для типа staff — вернет детали пользователя

Example: null

url

Type: string

Для типа ticket ссылка на Трекер

Example: example

Example
{
  "row_id": "example",
  "col_id": "example",
  "raw": null,
  "sort": null,
  "url": "example",
  "status": null,
  "transformed": null
}

SortDirection

An enumeration.

Type: string

Enum: asc, desc

LegacyGridSortSchema

Name

Description

name

Type: string

Имя колонки

Example: example

type

Type: SortDirection

An enumeration.

Enum: asc, desc

Example
{
  "type": "asc",
  "name": "example"
}

LegacyGridColumnTypes

An enumeration.

Type: string

Enum: string, number, date, select, staff, checkbox, ticket, ticket-assignee, ticket-reporter, ticket-status, ticket-priority, ticket-type, ticket-subject, ticket-updatedat, ticket-createdat, ticket-originalestimation, ticket-fixversions, ticket-components, ticket-storypoints, ticket-deadline, ticket-description, ticket-end, ticket-estimation, ticket-followers, ticket-lastcommentupdatedat, ticket-parent, ticket-pendingreplyfrom, ticket-project, ticket-queue, ticket-resolution, ticket-resolvedat, ticket-sprint, ticket-start, ticket-statusstarttime, ticket-statustype, ticket-tags, ticket-votes

LegacyColumnSchema

Name

Description

id

Type: string

Автогенерируемый идентификатор колонки. Во избежание двусмысленности переименован из name

Example: example

type

Type: LegacyGridColumnTypes

An enumeration.

Enum: string, number, date, select, staff, checkbox, ticket, ticket-assignee, ticket-reporter, ticket-status, ticket-priority, ticket-type, ticket-subject, ticket-updatedat, ticket-createdat, ticket-originalestimation, ticket-fixversions, ticket-components, ticket-storypoints, ticket-deadline, ticket-description, ticket-end, ticket-estimation, ticket-followers, ticket-lastcommentupdatedat, ticket-parent, ticket-pendingreplyfrom, ticket-project, ticket-queue, ticket-resolution, ticket-resolvedat, ticket-sprint, ticket-start, ticket-statusstarttime, ticket-statustype, ticket-tags, ticket-votes

format

Type: string

Для типа number, date и staff. Определяет, как отрисовать формат.

Example: example

mark_row_if_checked

Type: boolean

Только для типа checkbox. Влияет на то, как отображается строчка таблицы, если в данной колонке стоит «птичка»: Если true и «птичка» стоит, вся колонка будет отрисована блеклым цветом.
Бывший markdone

multiple

Type: boolean

Только для типов staff и select; принимает один или несколько ответов.

options

Type: string[]

Только для типов staff. Варианты, из которых можно выбрать ответ.

Example
[
  "example"
]

title

Type: string

Default: ``

width

Type: string

Ширина колонки

Example: example

width_units

Type: string

Единицы измерения, обычно %

Example: example

Example
{
  "type": "string",
  "id": "example",
  "title": "",
  "width": "example",
  "width_units": "example",
  "multiple": true,
  "options": [
    "example"
  ],
  "mark_row_if_checked": true,
  "format": "example"
}

LegacyGridStructureSchema

Name

Description

title

Type: string

Example: example

fields

Type: LegacyColumnSchema[]

Example
[
  {
    "type": "string",
    "id": "example",
    "title": "",
    "width": "example",
    "width_units": "example",
    "multiple": true,
    "options": [
      "example"
    ],
    "mark_row_if_checked": true,
    "format": "example"
  }
]

sorting

Type: LegacyGridSortSchema[]

Example
[
  {
    "type": "asc",
    "name": "example"
  }
]
Example
{
  "title": "example",
  "sorting": [
    {
      "type": "asc",
      "name": "example"
    }
  ],
  "fields": [
    {
      "type": "string",
      "id": "example",
      "title": "",
      "width": "example",
      "width_units": "example",
      "multiple": true,
      "options": [
        "example"
      ],
      "mark_row_if_checked": true,
      "format": "example"
    }
  ]
}

LegacyGridSchema

Name

Description

structure

Type: LegacyGridStructureSchema

Example
{
  "title": "example",
  "sorting": [
    {
      "type": "asc",
      "name": "example"
    }
  ],
  "fields": [
    {
      "type": "string",
      "id": "example",
      "title": "",
      "width": "example",
      "width_units": "example",
      "multiple": true,
      "options": [
        "example"
      ],
      "mark_row_if_checked": true,
      "format": "example"
    }
  ]
}

version

Type: string

Example: example

rows

Type: LegacyCellSchema[][]

Example
[
  [
    {
      "row_id": "example",
      "col_id": "example",
      "raw": null,
      "sort": null,
      "url": "example",
      "status": null,
      "transformed": null
    }
  ]
]
Example
{
  "rows": [
    [
      {
        "row_id": "example",
        "col_id": "example",
        "raw": null,
        "sort": null,
        "url": "example",
        "status": null,
        "transformed": null
      }
    ]
  ],
  "structure": {
    "title": "example",
    "sorting": [
      {
        "type": "asc",
        "name": "example"
      }
    ],
    "fields": [
      {
        "type": "string",
        "id": "example",
        "title": "",
        "width": "example",
        "width_units": "example",
        "multiple": true,
        "options": [
          "example"
        ],
        "mark_row_if_checked": true,
        "format": "example"
      }
    ]
  },
  "version": "example"
}

No longer supported, please use an alternative and newer version.