box-open-sdk 0.4.1

Box API client for Rust (open source, community, punk rock) — typed models, async managers, and a reqwest runtime with retry, backoff, and token refresh.
Documentation
<!-- Generated by box-gantry. DO NOT EDIT. -->
# ChunkedUploadsManager

Reach these methods through the `chunked_uploads` field on `client::Client`.

## create_file_upload_session

`POST /files/upload_sessions`

**Request body** (`application/json`): `CreateFileUploadSessionRequest`

**Returns:** `UploadSession`

**Example**

```rust
let result = client.chunked_uploads.create_file_upload_session(schemas::CreateFileUploadSessionRequest { /* … */ }).await?;
```

## create_file_version_upload_session

`POST /files/{file_id}/upload_sessions`

| Parameter | In | Type | Required |
|---|---|---|---|
| `file_id` | path | `String` | yes |

**Request body** (`application/json`): `CreateFileVersionUploadSessionRequest`

**Returns:** `UploadSession`

**Example**

```rust
let result = client.chunked_uploads.create_file_version_upload_session("FILE_ID".to_string(), schemas::CreateFileVersionUploadSessionRequest { /* … */ }).await?;
```

## get_file_upload_session

`GET /files/upload_sessions/{upload_session_id}`

| Parameter | In | Type | Required |
|---|---|---|---|
| `upload_session_id` | path | `String` | yes |

**Returns:** `UploadSession`

**Example**

```rust
let result = client.chunked_uploads.get_file_upload_session("UPLOAD_SESSION_ID".to_string()).await?;
```

## update_file_upload_session

`PUT /files/upload_sessions/{upload_session_id}`

| Parameter | In | Type | Required |
|---|---|---|---|
| `upload_session_id` | path | `String` | yes |
| `digest` | header | `String` | yes |
| `content-range` | header | `String` | yes |

**Request body** (`application/octet-stream`): `Vec<u8>`

**Returns:** `UploadedPart`

**Example**

```rust
let result = client.chunked_uploads.update_file_upload_session("UPLOAD_SESSION_ID".to_string(), "DIGEST".to_string(), "CONTENT-RANGE".to_string(), Default::default()).await?;
```

## delete_file_upload_session

`DELETE /files/upload_sessions/{upload_session_id}`

| Parameter | In | Type | Required |
|---|---|---|---|
| `upload_session_id` | path | `String` | yes |

**Returns:** no content

**Example**

```rust
client.chunked_uploads.delete_file_upload_session("UPLOAD_SESSION_ID".to_string()).await?;
```

## list_file_upload_session_parts

`GET /files/upload_sessions/{upload_session_id}/parts`

| Parameter | In | Type | Required |
|---|---|---|---|
| `upload_session_id` | path | `String` | yes |
| `offset` | query | `i64` | no |
| `limit` | query | `i64` | no |

**Returns:** `UploadParts`

**Example**

```rust
let mut pages = client.chunked_uploads.list_file_upload_session_parts("UPLOAD_SESSION_ID".to_string(), None);
while let Some(item) = pages.next().await {
    // use item
}
```

Paginated — `list_file_upload_session_parts(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).

## commit_file_upload_session

`POST /files/upload_sessions/{upload_session_id}/commit`

| Parameter | In | Type | Required |
|---|---|---|---|
| `upload_session_id` | path | `String` | yes |
| `digest` | header | `String` | yes |
| `if-match` | header | `String` | no |
| `if-none-match` | header | `String` | no |

**Request body** (`application/json`): `CommitFileUploadSessionRequest`

**Returns:** `Files`

**Example**

```rust
let result = client.chunked_uploads.commit_file_upload_session("UPLOAD_SESSION_ID".to_string(), "DIGEST".to_string(), schemas::CommitFileUploadSessionRequest { /* … */ }, None).await?;
```