---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.2
alternate:
  - https://yandex.ru/support/wiki/en/api-ref/upload_sessions/upload_sessions__upload_part.md
  - https://yandex.ru/support/wiki/ru/api-ref/upload_sessions/upload_sessions__upload_part.md
  - href: https://yandex.ru/support/wiki/ru/api-ref/upload_sessions/upload_sessions__upload_part.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/support/wiki/ru/llms.txt?revision=r21947862
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/wiki/ru/llms.txt?revision=r21947862

<div class="openapi">

# Загрузить фрагмент файла

<!-- markdownlint-disable-file -->

Загружает данные файла в созданную сессию.

- Используйте `Content-Type: application/octet-stream` и передавайте данные в теле запроса.
- При загрузке в S3 передавайте части с параметром `part_number`, начиная с `1`. Части можно
  загружать параллельно и повторно при ошибке. Размер части ограничен настройками сервиса.
- При загрузке через сервис загрузки файлов передайте файл целиком одним запросом: его размер
  должен совпадать с размером, указанным при создании сессии.

Общие заголовки и способы аутентификации описаны в разделе [Доступ к API](https://yandex.ru/support/wiki/ru/api-ref/access.md#headers). Примеры сценариев приведены в разделе [Примеры использования API](https://yandex.ru/support/wiki/ru/api-ref/examples.md).

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-put);margin-bottom: 12px">

<div class="openapi__request">

PUT {.openapi__method}
```text translate=no
https://api.wiki.yandex.net/v1/upload_sessions/{session_id}/upload_part
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_session_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid4&gt;

Идентификатор сессии загрузки в формате UUID. Передайте значение поля `session_id` из ответа метода `POST /v1/upload_sessions`.

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

#|
|| **Name** | **Description** ||
||

_part_number_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Номер загружаемой части файла от `1` до `10000`. При отправке файла целиком укажите `1`; при загрузке по частям нумеруйте их последовательно, начиная с `1`.

_Min value:_{.json-schema-reset .json-schema-assertion} `1`

_Max value:_{.json-schema-reset .json-schema-assertion} `10000`
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "session_id": "example",
  "file_name": "example",
  "file_size": 0,
  "status": "not_started",
  "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",
  "finished_at": "2025-01-01T00:00:00Z",
  "storage_type": "mds"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_created_at_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время создания сессии загрузки.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_file_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Имя загружаемого файла.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_file_size_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Заявленный при создании сессии размер файла в байтах.
{.table-cell}
||
||

_session_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid4&gt;

Идентификатор сессии загрузки файла в формате UUID. Используйте это значение как `session_id` в методах загрузки, завершения и отмены сессии.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UploadSessionStatusType**

  **Type**: [UploadSessionStatusType](#entity-UploadSessionStatusType)

  An enumeration.

  _Enum:_{.json-schema-reset .json-schema-value} `not_started`, `in_progress`, `finished`, `aborted`, `used`, `cleanup`

{% endcut %}

Состояние сессии загрузки.

_Example:_{.json-schema-reset .json-schema-example} `not_started`
{.table-cell}
||
||

_user_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UserSchema**

  **Type**: [UserSchema](#entity-UserSchema)

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

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  }
  ```

  {% endcut %}

{% endcut %}

Пользователь, создавший сессию загрузки.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_finished_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время завершения загрузки; null, если загрузка еще не завершена.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_storage_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **StorageType**

  **Type**: [StorageType](#entity-StorageType)

  An enumeration.

  _Enum:_{.json-schema-reset .json-schema-value} `mds`, `s3`, `custom_s3`

{% endcut %}

Тип хранилища файла.

_Example:_{.json-schema-reset .json-schema-example} `mds`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### UploadSessionStatusType {#entity-UploadSessionStatusType}

An enumeration.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `not_started`, `in_progress`, `finished`, `aborted`, `used`, `cleanup`

</div>

<div class="openapi-entity">

### UserIdentity {#entity-UserIdentity}

Идентификатор пользователя

#|
|| **Name** | **Description** ||
||

_cloud_uid_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Идентификатор пользователя в облаке

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_uid_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Идентификатор пользователя в Яндексе

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uid": "example",
  "cloud_uid": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### UserSchema {#entity-UserSchema}

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

#|
|| **Name** | **Description** ||
||

_affiliation_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Принадлежность пользователя

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_display_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Отображаемое имя пользователя

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Внутренний идентификатор пользователя
{.table-cell}
||
||

_is_dismissed_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Пользователь уволен
{.table-cell}
||
||

_username_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Логин пользователя

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_identity_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UserIdentity**

  **Type**: [UserIdentity](#entity-UserIdentity)

  Идентификатор пользователя

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "uid": "example",
    "cloud_uid": "example"
  }
  ```

  {% endcut %}

{% endcut %}

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

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uid": "example",
  "cloud_uid": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### StorageType {#entity-StorageType}

An enumeration.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `mds`, `s3`, `custom_s3`

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.