Добавить контент
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 |
|
is_silent |
Type: boolean Default: |
Body
application/json
{
"content": "string",
"body": {
"location": "top"
},
"section": {
"id": 0,
"location": "top"
},
"anchor": {
"name": "string",
"fallback": false,
"regex": false
}
}
|
Name |
Description |
|
content* |
Type: string Min length: |
|
anchor |
|
|
body |
|
|
section |
PageAppendContentAnchorSchema
|
Name |
Description |
|
name* |
Type: string |
|
fallback |
Type: boolean Default: |
|
regex |
Type: boolean Default: |
PageAppendContentBodySchema
|
Name |
Description |
|
location* |
Type: Location An enumeration. Enum: |
PageAppendContentSectionSchema
|
Name |
Description |
|
id* |
Type: integer |
|
location* |
Type: Location An enumeration. Enum: |
Responses
200 OK
OK
Body
application/json
{
"id": 0,
"slug": "string",
"title": "string",
"page_type": "page",
"redirect": {
"page_id": 0,
"redirect_target": {
"id": 0,
"slug": "string",
"title": "string",
"page_type": "page"
}
},
"breadcrumbs": [
{
"id": 0,
"title": "string",
"slug": "string",
"page_exists": false
}
],
"attributes": {
"created_at": "2022-12-29T18:02:01Z",
"modified_at": "2022-12-29T18:02:01Z",
"lang": "string",
"is_readonly": false,
"comments_count": 0,
"comments_enabled": false,
"keywords": [
"string"
],
"is_collaborative": false,
"is_draft": false
}
}
|
Name |
Description |
|
id* |
Type: integer |
|
page_type* |
Type: PageType An enumeration. Enum: |
|
slug* |
Type: string |
|
title* |
Type: string |
|
attributes |
Type: PageAttributesSchema По умолчанию поле не возвращается |
|
breadcrumbs |
Type: BreadcrumbSchema[] По умолчанию поле не возвращается |
|
content |
Type: any По умолчанию поле не возвращается
|
|
redirect |
Type: RedirectSchema По умолчанию поле не возвращается |
PageAttributesSchema
|
Name |
Description |
|
comments_count* |
Type: integer |
|
comments_enabled* |
Type: boolean |
|
created_at* |
Type: string<date-time> |
|
is_readonly* |
Type: boolean |
|
lang* |
Type: string |
|
modified_at* |
Type: string<date-time> |
|
is_collaborative |
Type: boolean |
|
is_draft |
Type: boolean |
|
keywords |
Type: string[] |
BreadcrumbSchema
|
Name |
Description |
|
page_exists* |
Type: boolean |
|
slug* |
Type: string |
|
title* |
Type: string |
|
id |
Type: integer |
RedirectSchema
|
Name |
Description |
|
page_id |
Type: integer ID страницы, на которую перенаправляет текущая страница. |
|
redirect_target |
Type: PageDetailsSchema Если есть цепочка редиректов A->B->C->D, для A,B и С, это будет страница D. |
PageDetailsSchema
|
Name |
Description |
|
id* |
Type: integer |
|
page_type* |
Type: PageType An enumeration. Enum: |
|
slug* |
Type: string |
|
title* |
Type: string |
No longer supported, please use an alternative and newer version.