Получить прикрепленные файлы

Request

GET

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

Path parameters

Name

Description

idx

Type: integer

Query parameters

Name

Description

cursor

Type: string

Example: ``

order_by

Type: string

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

Enum: name, size, created_at

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

Responses

200 OK

OK

Body

application/json
{
  "results": [
    {
      "id": 0,
      "name": "example",
      "is_downloadable": true,
      "download_url": "example",
      "size": "example",
      "description": "example",
      "user": {
        "id": 0,
        "identity": null,
        "username": "example",
        "display_name": "example",
        "is_dismissed": true,
        "affiliation": "example"
      },
      "created_at": "2025-01-01T00:00:00Z",
      "mimetype": "example",
      "has_preview": true,
      "check_status": "ready"
    }
  ],
  "next_cursor": "example",
  "prev_cursor": "example"
}

Name

Description

results

Type: AttachmentSchema[]

Example
[
  {
    "id": 0,
    "name": "example",
    "is_downloadable": true,
    "download_url": "example",
    "size": "example",
    "description": "example",
    "user": {
      "id": 0,
      "identity": null,
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    },
    "created_at": "2025-01-01T00:00:00Z",
    "mimetype": "example",
    "has_preview": true,
    "check_status": "ready"
  }
]

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

FileCheckStatusType

Статус проверки файла антивирусом:

  • check — файл проверяется
  • ready — файл проверен и безопасен
  • deleted — файл удален
  • infected — обнаружен вирус
  • error — ошибка при проверке

Type: string

Enum: check, ready, deleted, infected, error

AttachmentSchema

Прикрепленный файл к странице

Name

Description

created_at

Type: string<date-time>

Дата и время загрузки файла

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

description

Type: string

Описание файла

Example: example

download_url

Type: string

URL для скачивания файла

Example: example

has_preview

Type: boolean

Доступен ли предпросмотр файла

id

Type: integer

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

mimetype

Type: string

MIME-тип файла

Example: example

name

Type: string

Имя файла

Example: example

size

Type: string

Размер файла

Example: example

check_status

All of 1 type
  • FileCheckStatusType

    Type: FileCheckStatusType

    Статус проверки файла антивирусом:

    • check — файл проверяется
    • ready — файл проверен и безопасен
    • deleted — файл удален
    • infected — обнаружен вирус
    • error — ошибка при проверке

    Enum: check, ready, deleted, infected, error

Статус проверки файла антивирусом

Default: ready

is_downloadable

Type: boolean

Доступен ли файл для скачивания

Default: true

user

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"
}
Example
{
  "id": 0,
  "name": "example",
  "is_downloadable": true,
  "download_url": "example",
  "size": "example",
  "description": "example",
  "user": {
    "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",
  "mimetype": "example",
  "has_preview": true,
  "check_status": "ready"
}