Добавить комментарий

Request

POST

https://api.wiki.yandex.net/v1/pages/{idx}/comments

Path parameters

Name

Description

idx

Type: integer

Body

application/json
{
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "thread_id": 0
}

Name

Description

body

Type: string

Example: example

inline_text

Type: string

Example: example

parent_id

Type: integer

thread_id

Type: integer

Responses

200 OK

OK

Body

application/json
{
  "id": 0,
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "author": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "thread_id": 0,
  "created_at": "2025-01-01T00:00:00Z",
  "is_deleted": true,
  "resolve_status": "resolved",
  "reactions": [
    {
      "type": "like",
      "author": null,
      "created_at": "2025-01-01T00:00:00Z"
    }
  ]
}

Name

Description

author

All of 1 type
  • UserSchema

    Type: UserSchema

    Информация о пользователе

    Example
    {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    }
    

Автор комментария

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

body

Type: string

Текст комментария

Example: example

created_at

Type: string<date-time>

Дата и время создания комментария

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

id

Type: integer

Уникальный идентификатор комментария

is_deleted

Type: boolean

Флаг удаления комментария

reactions

Type: CommentReactionSchema[]

Реакции на комментарий

Example
[
  {
    "type": "like",
    "author": {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    },
    "created_at": "2025-01-01T00:00:00Z"
  }
]

resolve_status

All of 1 type
  • CommentResolveStatus

    Type: CommentResolveStatus

    Статус решения комментария:

    • resolved — комментарий решен
    • unresolved — комментарий не решен

    Enum: resolved, unresolved

Статус решения комментария

Example: resolved

inline_text

Type: string

Текст, к которому привязан комментарий (для инлайн-комментариев)

Example: example

parent_id

Type: integer

ID родительского комментария (для ответов в ветке)

thread_id

Type: integer

ID ветки комментариев

UserIdentity

Идентификатор пользователя

Name

Description

cloud_uid

Type: string

Идентификатор пользователя в облаке (для внешнего инстанса)

Example: example

uid

Type: string

Идентификатор пользователя в Яндекс (для внутреннего инстанса)

Example: example

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

UserSchema

Информация о пользователе

Name

Description

affiliation

Type: string

Принадлежность пользователя (например, yandex, external)

Example: example

display_name

Type: string

Отображаемое имя пользователя

Example: example

id

Type: integer

Внутренний идентификатор пользователя

is_dismissed

Type: boolean

Пользователь уволен

username

Type: string

Логин пользователя

Example: example

identity

All of 1 type
  • UserIdentity

    Type: UserIdentity

    Идентификатор пользователя

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

Идентификатор пользователя в системе

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"
}

CommentResolveStatus

Статус решения комментария:

  • resolved — комментарий решен
  • unresolved — комментарий не решен

Type: string

Enum: resolved, unresolved

ReactionType

Тип реакции на комментарий:

  • like — нравится
  • hooray — ура
  • confused — в замешательстве
  • heart — сердце
  • rocket — ракета
  • eyes — вижу
  • fire — огонь
  • ok — ок
  • facepalm — фейспалм
  • check — галочка
  • laugh — смех
  • dislike — не нравится

Type: string

Enum: like, hooray, confused, heart, rocket, eyes, fire, ok, facepalm, check, laugh, dislike

CommentReactionSchema

Name

Description

author

Type: UserSchema

Информация о пользователе

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

created_at

Type: string<date-time>

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

type

Type: ReactionType

Тип реакции на комментарий:

  • like — нравится
  • hooray — ура
  • confused — в замешательстве
  • heart — сердце
  • rocket — ракета
  • eyes — вижу
  • fire — огонь
  • ok — ок
  • facepalm — фейспалм
  • check — галочка
  • laugh — смех
  • dislike — не нравится

Enum: like, hooray, confused, heart, rocket, eyes, fire, ok, facepalm, check, laugh, dislike

Example
{
  "type": "like",
  "author": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "created_at": "2025-01-01T00:00:00Z"
}