Создать страницу

Request

POST

https://api.wiki.yandex.net/v1/pages

Query parameters

Name

Description

fields

Type: string

is_silent

Type: boolean

Default: false

Body

application/json
{
    "page_type": "page",
    "title": "string",
    "cloud_page": {
        "method": "empty_doc",
        "doctype": "docx"
    },
    "content": "string",
    "grid_format": "yfm"
}

Name

Description

page_type*

Type: PageType

An enumeration.

Enum: page, grid, cloud_page, wysiwyg, template

slug*

Type: any

title*

Type: string

Min length: 1

Max length: 255

cloud_page

Type: NewMs365
or ImportMs365FromLink
or UploadMs365
or FinalizeUploadMs365
or FinalizeUploadOnprem

Требуется для создания страницы с типом cloud_page'

  • Из URL (ссылка на Sharepoint или iframe c эмбеддом):
    • Используйте тип ImportMs365FromLink и cloud_page.source = from_url
  • Из нового документа:
    • Используйте тип NewMs365 и cloud_page.source = 'empty_doc'
  • Загрузить с машины.
    • Шаг 1. Используйте тип UploadMs365 и cloud_page.source = 'upload_doc'
    • Шаг 2. Загрузите через PUT по URL upload_to
    • Шаг 3. Используйте тип FinalizeUploadMs365 и cloud_page.source = 'finalize_upload'

content

Type: string

grid_format

Type: TextFormat

Формат текстовых колонок в таблице

Enum: yfm, wom, plain

PageType

An enumeration.

Type

Description

PageType

Enum: page, grid, cloud_page, wysiwyg, template

NewMs365

Name

Description

doctype*

Type: Ms365DocType

An enumeration.

Enum: docx, pptx, xlsx

method*

Type: string

Enum: empty_doc

Name

Description

method*

Type: string

Enum: from_url

url*

Type: string

UploadMs365

Name

Description

method*

Type: string

Enum: upload_doc

mimetype*

Type: string

FinalizeUploadMs365

Name

Description

method*

Type: string

Enum: finalize_upload

upload_session*

Type: string

FinalizeUploadOnprem

Name

Description

method*

Type: string

Enum: upload_onprem

upload_session*

Type: string

TextFormat

An enumeration.

Type

Description

TextFormat

Enum: yfm, wom, plain

Ms365DocType

An enumeration.

Type

Description

Ms365DocType

Enum: docx, pptx, xlsx

Responses

200 OK

OK

Body

application/json
{}

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