Getting attached files

Returns the files attached to the page.

For common headers and authentication methods, see Access to the API. For sample scenarios, see API usage examples.

Request

GET

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

Path parameters

Name

Description

idx

Type: integer

Page ID. The value of idx is the same as the id field value in the response to GET /v1/pages?slug=… or POST /v1/pages.

Query parameters

Name

Description

cursor

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Pagination cursor from next_cursor or prev_cursor in the previous response.

Example: ``

order_by

Type: string

If specified, sort the results by this field in the order_direction direction.

Enum: name, size, created_at

order_direction

All of: OrderDirection
  • OrderDirection

    Type: string

    An enumeration.

    Enum: asc, desc

Sort direction when order_by is specified.

Default: asc

Example: ``

page_size

Type: integer

Number of results per page.

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[]

Items on the current page of results

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

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

A cursor for requesting the next page of results

Example: example

prev_cursor

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Cursor for requesting the previous page of results

Example: example

UserIdentity

User ID

Name

Description

cloud_uid

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

User identifier in the cloud

Example: example

uid

Any of 2 types
  • Type: string

    Example: example

  • Type: null

    Example: null

Yandex user ID

Example: example

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

UserSchema

User information

Name

Description

affiliation

Type: string

User affiliation

Example: example

display_name

Type: string

User display name

Example: example

id

Type: integer

Internal user identifier

is_dismissed

Type: boolean

The user is dismissed

username

Type: string

User login

Example: example

identity

Any of 2 types
  • UserIdentity

    Type: UserIdentity

    User ID

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    
  • Type: null

    Example: null

User identifier in the system

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

File antivirus scan status:

  • check: The file is being scanned.
  • ready: The file is ready to use.
  • deleted: The file has been deleted.
  • infected: A virus was detected.
  • error: An error occurred during the scan.

Type: string

Enum: check, ready, deleted, infected, error

AttachmentSchema

File attached to a page

Name

Description

created_at

Type: string<date-time>

Date and time the file was uploaded

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

description

Type: string

File description

Example: example

download_url

Type: string

URL for downloading the file

Example: example

has_preview

Type: boolean

A preview is available for the file

id

Type: integer

Unique file ID

mimetype

Type: string

File MIME type

Example: example

name

Type: string

File name

Example: example

size

Type: string

File size in mebibytes (MiB)

Example: example

check_status

All of 1 type
  • FileCheckStatusType

    Type: FileCheckStatusType

    File antivirus scan status:

    • check: The file is being scanned.
    • ready: The file is ready to use.
    • deleted: The file has been deleted.
    • infected: A virus was detected.
    • error: An error occurred during the scan.

    Enum: check, ready, deleted, infected, error

File antivirus check status

Default: ready

is_downloadable

Type: boolean

The file is available for download

Default: true

user

Any of 2 types
  • UserSchema

    Type: UserSchema

    User information

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

    Example: null

User who uploaded the file

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": null,
      "cloud_uid": 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"
}