**Full name**: projects.locations.reasoningEngines.memories.retrieve

Retrieve memories.

### Endpoint

post `https://{service-endpoint}/v1beta1/{parent}/memories:retrieve`   
Where `{service-endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest#rest_endpoints).

### Path parameters

`parent` `string` Required. The resource name of the ReasoningEngine to retrieve memories from. Format: `projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}`

### Request body

The request body contains data with the following structure:
Fields `scope` `map (key: string, value: string)` Required. The scope of the memories to retrieve. A memory must have exactly the same scope (`Memory.scope`) as the scope provided here to be retrieved (same keys and values). Order does not matter, but it is case-sensitive.
`filter` `string` Optional. The standard list filter that will be applied to the retrieved memories. More detail in [AIP-160](https://google.aip.dev/160).

Supported fields: \* `fact` \* `createTime` \* `updateTime` \* `topics` (i.e. `topics.custom_memory_topic_label: "example topic" OR
topics.managed_memory_topic: USER_PREFERENCES`)
`memoryTypes[]` ``enum (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/MemoryType`)`` Optional. Specifies the types of memories to retrieve. If this field is empty or not provided, the request will default to retrieving only memories of type `NATURAL_LANGUAGE_COLLECTION`. If populated, the request will retrieve memories matching any of the specified `MemoryType` values.
`retrieval_params` `Union type` Parameters for retrieval. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: `similaritySearchParams` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/SimilaritySearchParams`)`` Parameters for semantic similarity search based retrieval.
`simpleRetrievalParams` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/SimpleRetrievalParams`)`` Parameters for simple (non-similarity search) retrieval.
End of mutually exclusive fields.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/RetrieveMemoriesResponse`.