# IRPCObjectOperations.DownloadFile_Stop

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Stop/

Badges: `Vault API / core` `read` `session or assertion` `idempotent`

Closes a download session.

- **Service:** [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md) `MFiles.IRPCObjectOperations`
- **gRPC method:** `/MFiles.IRPCObjectOperations/DownloadFile_Stop`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/download-file_-stop`
- **Request:** [`DownloadFile_StopRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Stop/index.md#request)
- **Response:** [`DownloadFile_StopResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Stop/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** read
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

Closing a session that does not exist, for example one the server already closed after the last
block was read, succeeds.

<a id="request"></a>

## Request: DownloadFile_StopRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `download_id` | `int32` | The ID of the download session. |

<a id="response"></a>

## Response: DownloadFile_StopResponse

No fields.

<a id="related"></a>

## Related methods

- [DownloadFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_ReadBlock/index.md): Reads a block of a file from a download session.
- [DownloadFile_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Begin/index.md): Opens a download session for a file version and returns its ID, the content size and, on request, its MD5 checksum.
- [DownloadFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile/index.md): Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP gateway.
