Получить ресурсы

Request

GET

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

Path parameters

Name

Description

idx

Type: integer

Query parameters

Name

Description

cursor

Type: string

Example: ``

order_by

Type: string

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

Enum: name_title, created_at

order_direction

All of: OrderDirection
  • OrderDirection

    Type: string

    An enumeration.

    Enum: asc, desc

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

Default: asc

Example: ``

page_id

Type: integer

legacy Номер страницы выдачи

Default: 1

Min value: 1

page_size

Type: integer

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

Default: 25

Min value: 1

Max value: 50

q

Type: string

Поиск по заголовку
Поиск по заголовку

Max length: 255

Example: ``

types

Type: string

Необходимые типы ресурсов, через запятую. Возможные значения: attachment, sharepoint_resource, grid

Example: ``

Responses

200 OK

OK

Body

application/json
{
  "results": [
    {
      "type": "attachment",
      "item": {
        "id": 0,
        "name": "example",
        "download_url": "example",
        "size": "example",
        "description": "example",
        "user": {},
        "created_at": "2025-01-01T00:00:00Z",
        "mimetype": "example",
        "has_preview": true
      }
    }
  ],
  "next_cursor": "example",
  "prev_cursor": "example"
}

Name

Description

results

Type: Resource[]

Example
[
  {
    "type": "attachment",
    "item": {
      "id": 0,
      "name": "example",
      "download_url": "example",
      "size": "example",
      "description": "example",
      "user": {
        "id": 0,
        "identity": {},
        "username": "example",
        "display_name": "example",
        "is_dismissed": true
      },
      "created_at": "2025-01-01T00:00:00Z",
      "mimetype": "example",
      "has_preview": true
    }
  }
]

next_cursor

Type: string

Example: example

prev_cursor

Type: string

Example: example

ResourceType

An enumeration.

Type: string

Enum: attachment, grid, sharepoint_resource

UserIdentity

Name

Description

cloud_uid

Type: string

Example: example

uid

Type: string

Example: example

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

UserSchema

Name

Description

display_name

Type: string

Example: example

id

Type: integer

is_dismissed

Type: boolean

username

Type: string

Example: example

identity

Type: UserIdentity

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

AttachmentSchema

Name

Description

created_at

Type: string<date-time>

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

description

Type: string

Example: example

download_url

Type: string

Example: example

has_preview

Type: boolean

id

Type: integer

mimetype

Type: string

Example: example

name

Type: string

Example: example

size

Type: string

Example: example

user

Type: UserSchema

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true
}
Example
{
  "id": 0,
  "name": "example",
  "download_url": "example",
  "size": "example",
  "description": "example",
  "user": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true
  },
  "created_at": "2025-01-01T00:00:00Z",
  "mimetype": "example",
  "has_preview": true
}

PageGridsSchema

Name

Description

created_at

Type: string<date-time>

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

id

Type: string<uuid4>

Example: example

title

Type: string

Example: example

Example
{
  "id": "example",
  "title": "example",
  "created_at": "2025-01-01T00:00:00Z"
}

Ms365DocType

An enumeration.

Type: string

Enum: docx, pptx, xlsx

PageSharepointSchema

Name

Description

created_at

Type: string<date-time>

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

doctype

Type: Ms365DocType

An enumeration.

Enum: docx, pptx, xlsx

id

Type: string<uuid4>

Example: example

title

Type: string

Example: example

Example
{
  "id": "example",
  "title": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "doctype": "docx"
}

Resource

Name

Description

item

Any of 3 types
  • AttachmentSchema

    Type: AttachmentSchema

    Example
    {
      "id": 0,
      "name": "example",
      "download_url": "example",
      "size": "example",
      "description": "example",
      "user": {
        "id": 0,
        "identity": {
          "uid": "example",
          "cloud_uid": "example"
        },
        "username": "example",
        "display_name": "example",
        "is_dismissed": true
      },
      "created_at": "2025-01-01T00:00:00Z",
      "mimetype": "example",
      "has_preview": true
    }
    
  • PageGridsSchema

    Type: PageGridsSchema

    Example
    {
      "id": "example",
      "title": "example",
      "created_at": "2025-01-01T00:00:00Z"
    }
    
  • PageSharepointSchema

    Type: PageSharepointSchema

    Example
    {
      "id": "example",
      "title": "example",
      "created_at": "2025-01-01T00:00:00Z",
      "doctype": "docx"
    }
    
Example
{
  "id": 0,
  "name": "example",
  "download_url": "example",
  "size": "example",
  "description": "example",
  "user": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true
  },
  "created_at": "2025-01-01T00:00:00Z",
  "mimetype": "example",
  "has_preview": true
}

type

Type: ResourceType

An enumeration.

Enum: attachment, grid, sharepoint_resource

Example
{
  "type": "attachment",
  "item": {
    "id": 0,
    "name": "example",
    "download_url": "example",
    "size": "example",
    "description": "example",
    "user": {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true
    },
    "created_at": "2025-01-01T00:00:00Z",
    "mimetype": "example",
    "has_preview": true
  }
}

No longer supported, please use an alternative and newer version.

Предыдущая
Следующая