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

# get_records_from_collection

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/get_records_from_collection.rs#L41-L54)
pub async fn [get\_records\_from\_collection](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/get-records-from-collection.md#method.get_records_from_collection)\<R: [RetrievedRecord](https://docs.kinetica.com/content/api/rust/record_retriever/trait.RetrievedRecord.md)>( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), offset: [i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html), limit: [i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[GetRecordsFromCollectionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionResponse.md)\<R>, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

\[DEPRECATED] Retrieve records from a collection, optionally returning the record IDsRetrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as `/delete/records`.This operation supports paging through the data via the `offset` and `limit` parameters.Note that when using the Java API, it is not possible to retrieve records from join views using this operation.The records are decoded by the types the server names, as known to this client or else read from the server.

##### Arguments

<ul>
  <li>`table_name` - Name of the collection or table from which records are to be retrieved, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing collection or table.</li>
  <li>`offset` - A positive integer indicating the number of initial results to skip (this can be useful for paging through the results).</li>
  <li>`limit` - A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server’s own limit, defined by the max\_get\_records\_size parameter in the server configuration. Use `offset` and `limit` to request subsequent pages of results.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/get_records_from_collection.rs#L87-L110)
pub async fn [get\_records\_from\_collection\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/get-records-from-collection.md#method.get_records_from_collection_with_opts)\<R: [RetrievedRecord](https://docs.kinetica.com/content/api/rust/record_retriever/trait.RetrievedRecord.md)>( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), offset: [i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html), limit: [i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html), options: [GetRecordsFromCollectionRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[GetRecordsFromCollectionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionResponse.md)\<R>, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

\[DEPRECATED] Retrieve records from a collection, optionally returning the record IDsRetrieves records from a collection. The operation can optionally return the record IDs which can be used in certain queries such as `/delete/records`.This operation supports paging through the data via the `offset` and `limit` parameters.Note that when using the Java API, it is not possible to retrieve records from join views using this operation.The records are decoded by the types the server names, as known to this client or else read from the server.

##### Arguments

<ul>
  <li>`table_name` - Name of the collection or table from which records are to be retrieved, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing collection or table.</li>
  <li>`offset` - A positive integer indicating the number of initial results to skip (this can be useful for paging through the results).</li>
  <li>`limit` - A positive integer indicating the maximum number of results to be returned, or END\_OF\_SET (-9999) to indicate that the maximum number of results allowed by the server should be returned. The number of records returned will never exceed the server’s own limit, defined by the max\_get\_records\_size parameter in the server configuration. Use `offset` and `limit` to request subsequent pages of results.</li>
  <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/get_records_from_collection.rs#L172-L194)
pub async fn [get\_records\_from\_collection\_request](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/get-records-from-collection.md#method.get_records_from_collection_request)\<R: [RetrievedRecord](https://docs.kinetica.com/content/api/rust/record_retriever/trait.RetrievedRecord.md)>( \&self, request: &[GetRecordsFromCollectionRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionRequest.md), record\_type: [Option](https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html)\<&[Arc](https://doc.rust-lang.org/1.98.1/alloc/sync/struct.Arc.html)\<[Type](https://docs.kinetica.com/content/api/rust/generic_record/struct.Type.md)>>, ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[GetRecordsFromCollectionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionResponse.md)\<R>, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`GetRecordsFromCollectionRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionRequest) to the `/get/records/fromcollection` endpoint and decodes the records it returns, by `record_type` if given, else by the types the server names. Only binary encoding is supported.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/get_records_from_collection.rs#L198-L209)
pub async fn [get\_records\_from\_collection\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/get-records-from-collection.md#method.get_records_from_collection_raw)( \&self, request: &[GetRecordsFromCollectionRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[RawGetRecordsFromCollectionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.RawGetRecordsFromCollectionResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`GetRecordsFromCollectionRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionRequest) to the `/get/records/fromcollection` endpoint, returning the response as the server sends it.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/get_records_from_collection.rs#L213-L225)
pub async fn [get\_records\_from\_collection\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/get-records-from-collection.md#method.get_records_from_collection_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[GetRecordsFromCollectionRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[RawGetRecordsFromCollectionResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.RawGetRecordsFromCollectionResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`GetRecordsFromCollectionRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.GetRecordsFromCollectionRequest) 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.