Получить комментарии

Request

GET

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

Path parameters

Name

Description

idx

Type: integer

Query parameters

Name

Description

cursor

Type: string

Example: ``

order_by

Type: string

Если указано, отсортировать выдачу по полю в направлении direction

Const: created_at

Example: ``

order_direction

All of: OrderDirection
  • OrderDirection

    Type: string

    An enumeration.

    Enum: asc, desc

Если указано поле order_by, направление сортировки

Default: asc

Example: ``

page_size

Type: integer

Число результатов на странице выдачи.

Default: 50

Min value: 1

Max value: 100

status_filter

All of: CommentResolveStatus
  • CommentResolveStatus

    Type: string

    An enumeration.

    Enum: resolved, unresolved

Фильтрация по статусу комментария, принимает CommentResolveStatus (resolved, unresolved)

Example: ``

Responses

200 OK

OK

Body

application/json
{
  "results": [
    {
      "id": 0,
      "body": "example",
      "inline_text": "example",
      "parent_id": 0,
      "author": {
        "id": 0,
        "identity": null,
        "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"
        }
      ],
      "thread_info": {
        "total_posts": 0,
        "last_comment": {
          "id": 0,
          "body": "example",
          "inline_text": "example",
          "parent_id": 0,
          "author": null,
          "thread_id": 0,
          "created_at": "2025-01-01T00:00:00Z",
          "is_deleted": true,
          "resolve_status": null,
          "reactions": [
            null
          ]
        }
      }
    }
  ],
  "next_cursor": "example",
  "prev_cursor": "example"
}

Name

Description

results

Type: CommentSchemaExt[]

Example
[
  {
    "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"
      }
    ],
    "thread_info": {
      "total_posts": 0,
      "last_comment": {
        "id": 0,
        "body": "example",
        "inline_text": "example",
        "parent_id": 0,
        "author": null,
        "thread_id": 0,
        "created_at": "2025-01-01T00:00:00Z",
        "is_deleted": true,
        "resolve_status": null,
        "reactions": [
          null
        ]
      }
    }
  }
]

next_cursor

Type: string

Example: example

prev_cursor

Type: string

Example: example

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

CommentSchema

Комментарий к странице

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 ветки комментариев

Example
{
  "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"
    }
  ]
}

ThreadSchema

Name

Description

last_comment

Type: CommentSchema

Комментарий к странице

Example
{
  "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"
    }
  ]
}

total_posts

Type: integer

Example
{
  "total_posts": 0,
  "last_comment": {
    "id": 0,
    "body": "example",
    "inline_text": "example",
    "parent_id": 0,
    "author": {
      "id": 0,
      "identity": null,
      "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"
      }
    ]
  }
}

CommentSchemaExt

Name

Description

author

Type: UserSchema

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

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

Type: CommentResolveStatus

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

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

Enum: resolved, unresolved

inline_text

Type: string

Example: example

parent_id

Type: integer

thread_id

Type: integer

thread_info

Type: ThreadSchema

Example
{
  "total_posts": 0,
  "last_comment": {
    "id": 0,
    "body": "example",
    "inline_text": "example",
    "parent_id": 0,
    "author": {
      "id": 0,
      "identity": null,
      "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"
      }
    ]
  }
}
Example
{
  "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"
    }
  ],
  "thread_info": {
    "total_posts": 0,
    "last_comment": {
      "id": 0,
      "body": "example",
      "inline_text": "example",
      "parent_id": 0,
      "author": null,
      "thread_id": 0,
      "created_at": "2025-01-01T00:00:00Z",
      "is_deleted": true,
      "resolve_status": null,
      "reactions": [
        null
      ]
    }
  }
}
Предыдущая