> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# drop_session

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/drop_session.rs#L25-L28)
pub async fn [drop\_session](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/drop-session.md#method.drop_session)(\&self) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DropSessionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Drop the objects owned by a sessionEnds the client session named by the X-Kinetica-Session HTTP header of this request, dropping every session temp table (a table created in SQL as #name) that belongs to it. Objects outside the session that depend on those tables are invalidated, not dropped.A client sends its session ID in the X-Kinetica-Session HTTP header to every endpoint (e.g., /execute/sql), and needs to call this endpoint only when a response’s info map has carried session\_id\_used set to true.Only the user that owns the session, or a system administrator, may drop it. Dropping an unknown session is a no-op.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/drop_session.rs#L48-L62)
pub async fn [drop\_session\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/drop-session.md#method.drop_session_with_opts)( \&self, options: [DropSessionRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DropSessionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Drop the objects owned by a sessionEnds the client session named by the X-Kinetica-Session HTTP header of this request, dropping every session temp table (a table created in SQL as #name) that belongs to it. Objects outside the session that depend on those tables are invalidated, not dropped.A client sends its session ID in the X-Kinetica-Session HTTP header to every endpoint (e.g., /execute/sql), and needs to call this endpoint only when a response’s info map has carried session\_id\_used set to true.Only the user that owns the session, or a system administrator, may drop it. Dropping an unknown session is a no-op.

##### Arguments

<ul>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/drop_session.rs#L65-L76)
pub async fn [drop\_session\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/drop-session.md#method.drop_session_raw)( \&self, request: &[DropSessionRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DropSessionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`DropSessionRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionRequest) to the `/drop/session` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/drop_session.rs#L80-L92)
pub async fn [drop\_session\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/drop-session.md#method.drop_session_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[DropSessionRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DropSessionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`DropSessionRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.DropSessionRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.