Добавить контент
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: |
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: Example: |
|
anchor |
Type: PageAppendContentAnchorSchema Example
|
|
body |
Type: PageAppendContentBodySchema Example
|
|
section |
Type: PageAppendContentSectionSchema Example
|
Location
An enumeration.
Type: string
Enum: top, bottom
PageAppendContentBodySchema
|
Name |
Description |
|
location |
Type: Location An enumeration. Enum: |
Example
{
"location": "top"
}
PageAppendContentSectionSchema
|
Name |
Description |
|
id |
Type: integer |
|
location |
Type: Location An enumeration. Enum: |
Example
{
"id": 0,
"location": "top"
}
PageAppendContentAnchorSchema
|
Name |
Description |
|
name |
Type: string Example: |
|
fallback |
Type: boolean Default: |
|
regex |
Type: boolean Default: |
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": "page"
}
},
"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": "example"
}
|
Name |
Description |
|
id |
Type: integer |
|
page_type |
Type: string Enum: |
|
slug |
Type: string Example: |
|
title |
Type: string Example: |
|
attributes |
All of 1 type
По умолчанию поле не возвращается Example
|
|
breadcrumbs |
Type: BreadcrumbSchema[] По умолчанию поле не возвращается Example
|
|
content |
Type: string По умолчанию поле не возвращается Контент страницы в виде строки. Example: |
|
redirect |
All of 1 type
По умолчанию поле не возвращается Example
|
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: |
|
slug |
Type: string Example: |
|
title |
Type: string 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
Например, если задана цепочка редиректов A->B->C->D, для A,B и С, это будет страница D Example
|
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: |
|
title |
Type: string 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: |
|
is_readonly |
Type: boolean |
|
lang |
Type: string Example: |
|
modified_at |
Type: string<date-time> Example: |
|
is_collaborative |
Type: boolean |
|
is_draft |
Type: boolean |
|
keywords |
Type: string[] 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
}