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 |
Query parameters
|
Name |
Description |
|
cursor |
Any of 2 types
Pagination cursor from Example: `` |
|
order_by |
Type: string If specified, sort the results by this field in the Enum: |
|
order_direction |
All of: OrderDirection
Sort direction when Default: Example: `` |
|
page_size |
Type: integer Number of results per page. Default: Min value: Max value: |
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
|
|
next_cursor |
Any of 2 types
A cursor for requesting the next page of results Example: |
|
prev_cursor |
Any of 2 types
Cursor for requesting the previous page of results Example: |
UserIdentity
User ID
|
Name |
Description |
|
cloud_uid |
Any of 2 types
User identifier in the cloud Example: |
|
uid |
Any of 2 types
Yandex user ID Example: |
Example
{
"uid": "example",
"cloud_uid": "example"
}
UserSchema
User information
|
Name |
Description |
|
affiliation |
Type: string User affiliation Example: |
|
display_name |
Type: string User display name Example: |
|
id |
Type: integer Internal user identifier |
|
is_dismissed |
Type: boolean The user is dismissed |
|
username |
Type: string User login Example: |
|
identity |
Any of 2 types
User identifier in the system 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: |
|
description |
Type: string File description Example: |
|
download_url |
Type: string URL for downloading the file 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: |
|
name |
Type: string File name Example: |
|
size |
Type: string File size in mebibytes (MiB) Example: |
|
check_status |
All of 1 type
File antivirus check status Default: |
|
is_downloadable |
Type: boolean The file is available for download Default: |
|
user |
Any of 2 types
User who uploaded the file 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"
}