> ## 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.

# submit_request

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L3669-L3733)

#### pub async fn [submit\_request](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/submit.md#method.submit_request)\<Req, Resp>( \&self, endpoint: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), req\_schema: \&FastSchema, resp\_schema: \&FastSchema, request: [\&Req](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html), ) ->[Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<Resp, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>&#xA;where Req: [KineticaRecord](https://docs.kinetica.com/content/api/rust/trait.KineticaRecord.md), Resp: [DeserializeOwned](https://docs.rs/serde_core/1.0.228/serde_core/de/trait.DeserializeOwned.html),

Submits a request to the Kinetica server with HA failover support.This method implements HA failover:

<ul>
  <li>Captures the current cluster switch count before attempting the request</li>
  <li>On connection errors, attempts to switch to the next available cluster</li>
  <li>Retries the request on the new cluster</li>
  <li>Propagates API errors (server-side errors) without failover</li>
</ul>

##### Arguments

<ul>
  <li>`endpoint` - The API endpoint (e.g., “/show/table”)</li>
  <li>`req_schema` - Pre-parsed Avro schema for the request</li>
  <li>`resp_schema` - Pre-parsed Avro schema for the response</li>
  <li>`request` - The request object</li>
</ul>

##### Returns

The response object, or an error if the request fails on all clusters.


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