# Search

## Searches for matching Memory objects.

> The search is performed using the same algorithm employed in the> \
> Text Entered event of the R1 state of the Dialog State Machine.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Search/{strSessionID}":{"post":{"tags":["Search"],"summary":"Searches for matching Memory objects.","description":"The search is performed using the same algorithm employed in the\r\nText Entered event of the R1 state of the Dialog State Machine.","operationId":"Search-SearchMemories","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Search specifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuerySpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchMemoriesResponse"}}}}}}}},"components":{"schemas":{"SearchQuerySpecs":{"type":"object","properties":{"text":{"type":"string","description":"Search query.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"searchType":{"type":"string","description":"How to interpret the search query in the Text property:<ul><li>If \"Semantic\", the query is interpreted as a full question in natural language,\r\n    and the search is performed in the same way a question would be posed to the\r\n    Dialog State Machine.</li><li>If \"Literal\", the query is intended as space-separated keywords,\r\n    and the search is performed by looking for them as a substring in the\r\n    text and titles of Memories.</li></ul>\r\nIf omitted the search is Semantic by default.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"date":{"type":"string","description":"Approximate date of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty of the date, in days.\r\nRequired if Date is specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeName":{"type":"string","description":"Name of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","nullable":true},"placeLatitude":{"type":"number","description":"Latitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Longitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty of place, in kilometers.\r\nRequired if PlaceName or PlaceLatitude and PlaceLongitude are specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"tag":{"type":"string","description":"Extends or limits the search to Memories associated with a Receiver with this tag,\r\ndepending on the API called:<ul><li>For Search, Random picking and Memory Hints, the search is <em>extended</em>\r\n    to Memories associated with a Receiver with this tag. If omitted the search is limited\r\n    to public Memories. As a special case, if the Giver tag is specified then the search is\r\n    extended to all Memories, whoever they are associated to.</li><li>For Filter Memories, the search is <em>limited</em> to Memories associated with a\r\n    Receiver with this tag.</li></ul>","nullable":true},"ignoreLastRead":{"type":"boolean","description":"If set to ```True```, recently picked Memories will not be deprioritized.\r\nThis means that a Memory never picked and a Memory picked just moments ago\r\nwill have the same probability to be picked again.\r\nIf omitted or set to ```False```, recently picked Memories\r\nwill be much less probable to be picked again.\r\nUsed only for Random picking.\r\nIgnored for Search, Filter Memories and Memory Hints.","nullable":true},"excludedMemoryIDs":{"type":"array","items":{"type":"string"},"description":"Optional list of Memory IDs that must be excluded from the search result.","nullable":true},"contextVars":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToMatch of Memories.\r\nUsed for Search, Filter Memories and Random picking and Memory Hints.","nullable":true},"contextVarsToSet":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToSet of Memories.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"memoryTags":{"type":"array","items":{"type":"string"},"description":"Optional list of memory tags. If specified, the search is limited to Memories\r\nincluding ALL the specified tags.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"numberOfResults":{"type":"integer","description":"Optional number of results. If omitted defaults to 5.","format":"int32","nullable":true},"startFrom":{"type":"integer","description":"Optional initial result index, 0-based. If omitted defaults to 0.\r\nUsed for Search, Filter Memories and Memory Hints.\r\nIgnored for Random picking.","format":"int32","nullable":true},"memoryType":{"type":"string","description":"Optional parameter, if set, filter returns only selected type of memories.\r\nUsed only for Filter Memories.","nullable":true},"withMediaOnly":{"type":"boolean","description":"Optional parameter, if set, filter returns only memories that contain media.\r\nUsed only for Filter Memories.","nullable":true}},"additionalProperties":false,"description":"Specifications for a Memory search."},"SearchMemoriesResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of Match objects.","format":"int32"},"matches":{"type":"array","items":{"$ref":"#/components/schemas/MatchSpecs"},"description":"List of Match objects.\r\nMay be empty.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Search Memories request."},"MatchSpecs":{"type":"object","properties":{"memory":{"$ref":"#/components/schemas/MemorySpecs"},"confidence":{"type":"number","description":"Match confidence, between ```0.0``` (no confidence) and\r\n```1.0``` (full confidence).","format":"double"},"confidenceLevel":{"type":"string","description":"Confidence level, e.g. ```LOW```, ```MEDIUM``` or ```HIGH```.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Match object."},"MemorySpecs":{"type":"object","properties":{"memoryID":{"type":"string","description":"Memory object ID.","nullable":true},"memoryType":{"type":"string","description":"Memory type, e.g. <code>Question</code>, <code>Story</code> or <code>Default</code>. Required during Add operations. <br> Currently possible values are:<ul> <li><code>Question</code>: this Memory is a question, hence its title is expected in interrogative form</li> <li><code>Story</code>: this Memory is a story, hence its title is expected in affirmative form</li> <li><code>Default</code>: this Memory is a default answer, hence its title is ignored (empty or null)</li> <li><code>CompletionDraft</code>: this Memory is draft from a completion, obtained via a generative AI.</li> <li><code>ExpertReference</code>: this Memory is the results of a question asked to a Board of Experts, and the answer is the name of the Expert that replied to the question.</li> </ul>","nullable":true},"lastRead":{"type":"string","description":"Timestamp of the last time this Memory has been shown to a Receiver.\r\nThis value is also used when picking random memories to avoid showing\r\nmemories that have already been shown recently.\r\n```Null``` if the Memory has not been shown yet.","format":"date-time","nullable":true},"readOccurrences":{"type":"integer","description":"Number of times this Memory has been shown to a Receiver.\r\n```Null``` if the Memory has not been shown yet.","format":"int32","nullable":true},"receiverID":{"type":"string","description":"ID of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public. When updating,\r\nset it to a single dash character (```-```) to remove a\r\npreviously set association with a Person.","nullable":true},"receiverTag":{"type":"string","description":"Tag of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public.","nullable":true},"receiverName":{"type":"string","description":"Name of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public.","nullable":true},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediumSpecs"},"description":"List of Medium objects associated with this Memory.\r\nMay be empty.","nullable":true},"title":{"type":"string","description":"Title of the Question or Story.\r\nNull if this Memory is a Default.","nullable":true},"titleVariants":{"type":"array","items":{"type":"string"},"description":"Title variants of this Question or Story.\r\nEmpty if this Memory is a Default.","nullable":true},"answers":{"type":"array","items":{"$ref":"#/components/schemas/AnswerSpecs"},"description":"List of its Answer objects.\r\nAt least one answer must be present.","nullable":true},"date":{"type":"string","description":"Approximate date associated with this Memory.\r\nWhen updating, set it to midnight Jan. 1st 1 A.D.\r\n(```01/01/01 00:00:00```) to clear any previously set\r\nDate and DateUncertaintyDays.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty in the date associated with this Memory,\r\nexpressed in days.","format":"double","nullable":true},"placeName":{"type":"string","description":"Name of the place associated with this Memory.\r\nWhen updating, set it to a single dash character\r\n(```-```) to clear any previously set Place (by name or\r\ncoordinates) and PlaceUncertaintyKm.","nullable":true},"placeLatitude":{"type":"number","description":"Latitude of the place associated with this Memory.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Longitude of the place associated with this Memory.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty of the place associated with this Memory,\r\nexpressed in kilometers.","format":"double","nullable":true},"conclusive":{"type":"boolean","description":"If ```True```, when this Memory is emitted it is NOT followed by a continuation prompt,\r\nsuch as \"Is there anything else you want to know?\".","nullable":true},"notPickable":{"type":"boolean","description":"If ```True```, this Memory can't be randomly picked with a Timeout Event, or\r\nexplicitly searching for random Memory objects.\r\nIgnored for Memory of type Default.","nullable":true},"help":{"type":"boolean","description":"If ```True```, this Memory's content can be emitted if the user fails\r\nto find a question with an answer at the beginning of a session.\r\nIgnored for Memory of type Default.","nullable":true},"hints":{"type":"array","items":{"type":"string"},"description":"Hints for this Memory.","nullable":true},"minTimeout":{"type":"number","description":"Minimum idle timeout, in seconds. If not specified, by default it is set to 20 seconds. <br> The idle timeout is the time after which the client sends a Timeout event and, typically, a random question or story is picked up and proposed to the user. The actual idle timeout is computed as a random number between <code>MinTimeout</code> and <code>MaxTimeout</code> plus the reading time, where the reading time is in turn computed as the time it would take to read the answer at 150 words per minute.","format":"double","nullable":true},"maxTimeout":{"type":"number","description":"Maximum idle timeout, in seconds. If not specified, by default it is set to 40 seconds. <br> The idle timeout is the time after which the client sends a Timeout event and, typically, a random question or story is picked up and proposed to the user. The actual idle timeout is computed as a random number between <code>MinTimeout</code> and <code>MaxTimeout</code> plus the reading time, where the reading time is in turn computed as the time it would take to read the answer at 150 words per minute.","format":"double","nullable":true},"contextVarsToSet":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"List of variable-value pairs to be used to alter the context when this Memory is matched.\r\nUse the special value ```-``` (a single dash character) to clear a context variable.","nullable":true},"contextVarsToMatch":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"List of variable-value pairs to be used to match this Memory with the context. If the context\r\ncontains a variable listed here, the value must match for the Memory to match.","nullable":true},"dcmOutcomeType":{"type":"string","description":"Optional type of the outcome to be sent to the DCM platform when this Memory is emitted.","nullable":true},"dcmOutcomeCode":{"type":"string","description":"Optional code of the outcome to be sent to the DCM platform when this Memory is emitted.","nullable":true},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for this Memory.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Memory object."},"MediumSpecs":{"type":"object","properties":{"mediumID":{"type":"string","description":"Medium object ID.","nullable":true},"url":{"type":"string","description":"URL of the Medium. If specified, the Content property must be ```Null```.\r\nUse this property to link large amounts of data stored externally.\r\nIf the amount of data is modest the Content property may be used as an alternative.","nullable":true},"content":{"type":"string","description":"Content of the Medium. If specified, the URL property must be ```Null```.\r\nDon't use this property to store large amounts of data. Can be used to store limited \r\ntext for a maximum of 10 KiB. For larger amounts store the data externally and link it\r\nvia the URL property.","nullable":true},"mimeType":{"type":"string","description":"MIME type of the Medium.\r\nRequired during Add operations.","nullable":true},"title":{"type":"string","description":"Title of the Medium.","nullable":true},"properties":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Key-value pairs for additional structured content storage.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Medium object."},"AnswerSpecs":{"type":"object","properties":{"text":{"type":"string","description":"Text of the Answer.\r\nRequired during Add operations.","nullable":true},"preformatted":{"type":"boolean","description":"If ```True```, when this Answer is emitted no reformatting is applied.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of an Answer object."}}}}
````

## Searches for matching Memory objects, with pagination.

> The search is performed using the same algorithm employed in the> \
> Text Entered event of the R1 state of the Dialog State Machine.> \
> The From and HowMany parameters overwrite the StartFrom and> \
> NumberOfResults fields of the SearchQuerySpecs object.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Search/{strSessionID}/{from}/{howMany}":{"post":{"tags":["Search"],"summary":"Searches for matching Memory objects, with pagination.","description":"The search is performed using the same algorithm employed in the\r\nText Entered event of the R1 state of the Dialog State Machine.\r\nThe From and HowMany parameters overwrite the StartFrom and\r\nNumberOfResults fields of the SearchQuerySpecs object.","operationId":"Search-SearchMemoriesPaginated","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"from","in":"path","description":"The 0-based index of the first Memory object to list","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"howMany","in":"path","description":"The number of the Memory objects to list","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Search specifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuerySpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchMemoriesResponse"}}}}}}}},"components":{"schemas":{"SearchQuerySpecs":{"type":"object","properties":{"text":{"type":"string","description":"Search query.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"searchType":{"type":"string","description":"How to interpret the search query in the Text property:<ul><li>If \"Semantic\", the query is interpreted as a full question in natural language,\r\n    and the search is performed in the same way a question would be posed to the\r\n    Dialog State Machine.</li><li>If \"Literal\", the query is intended as space-separated keywords,\r\n    and the search is performed by looking for them as a substring in the\r\n    text and titles of Memories.</li></ul>\r\nIf omitted the search is Semantic by default.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"date":{"type":"string","description":"Approximate date of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty of the date, in days.\r\nRequired if Date is specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeName":{"type":"string","description":"Name of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","nullable":true},"placeLatitude":{"type":"number","description":"Latitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Longitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty of place, in kilometers.\r\nRequired if PlaceName or PlaceLatitude and PlaceLongitude are specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"tag":{"type":"string","description":"Extends or limits the search to Memories associated with a Receiver with this tag,\r\ndepending on the API called:<ul><li>For Search, Random picking and Memory Hints, the search is <em>extended</em>\r\n    to Memories associated with a Receiver with this tag. If omitted the search is limited\r\n    to public Memories. As a special case, if the Giver tag is specified then the search is\r\n    extended to all Memories, whoever they are associated to.</li><li>For Filter Memories, the search is <em>limited</em> to Memories associated with a\r\n    Receiver with this tag.</li></ul>","nullable":true},"ignoreLastRead":{"type":"boolean","description":"If set to ```True```, recently picked Memories will not be deprioritized.\r\nThis means that a Memory never picked and a Memory picked just moments ago\r\nwill have the same probability to be picked again.\r\nIf omitted or set to ```False```, recently picked Memories\r\nwill be much less probable to be picked again.\r\nUsed only for Random picking.\r\nIgnored for Search, Filter Memories and Memory Hints.","nullable":true},"excludedMemoryIDs":{"type":"array","items":{"type":"string"},"description":"Optional list of Memory IDs that must be excluded from the search result.","nullable":true},"contextVars":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToMatch of Memories.\r\nUsed for Search, Filter Memories and Random picking and Memory Hints.","nullable":true},"contextVarsToSet":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToSet of Memories.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"memoryTags":{"type":"array","items":{"type":"string"},"description":"Optional list of memory tags. If specified, the search is limited to Memories\r\nincluding ALL the specified tags.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"numberOfResults":{"type":"integer","description":"Optional number of results. If omitted defaults to 5.","format":"int32","nullable":true},"startFrom":{"type":"integer","description":"Optional initial result index, 0-based. If omitted defaults to 0.\r\nUsed for Search, Filter Memories and Memory Hints.\r\nIgnored for Random picking.","format":"int32","nullable":true},"memoryType":{"type":"string","description":"Optional parameter, if set, filter returns only selected type of memories.\r\nUsed only for Filter Memories.","nullable":true},"withMediaOnly":{"type":"boolean","description":"Optional parameter, if set, filter returns only memories that contain media.\r\nUsed only for Filter Memories.","nullable":true}},"additionalProperties":false,"description":"Specifications for a Memory search."},"SearchMemoriesResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of Match objects.","format":"int32"},"matches":{"type":"array","items":{"$ref":"#/components/schemas/MatchSpecs"},"description":"List of Match objects.\r\nMay be empty.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Search Memories request."},"MatchSpecs":{"type":"object","properties":{"memory":{"$ref":"#/components/schemas/MemorySpecs"},"confidence":{"type":"number","description":"Match confidence, between ```0.0``` (no confidence) and\r\n```1.0``` (full confidence).","format":"double"},"confidenceLevel":{"type":"string","description":"Confidence level, e.g. ```LOW```, ```MEDIUM``` or ```HIGH```.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Match object."},"MemorySpecs":{"type":"object","properties":{"memoryID":{"type":"string","description":"Memory object ID.","nullable":true},"memoryType":{"type":"string","description":"Memory type, e.g. <code>Question</code>, <code>Story</code> or <code>Default</code>. Required during Add operations. <br> Currently possible values are:<ul> <li><code>Question</code>: this Memory is a question, hence its title is expected in interrogative form</li> <li><code>Story</code>: this Memory is a story, hence its title is expected in affirmative form</li> <li><code>Default</code>: this Memory is a default answer, hence its title is ignored (empty or null)</li> <li><code>CompletionDraft</code>: this Memory is draft from a completion, obtained via a generative AI.</li> <li><code>ExpertReference</code>: this Memory is the results of a question asked to a Board of Experts, and the answer is the name of the Expert that replied to the question.</li> </ul>","nullable":true},"lastRead":{"type":"string","description":"Timestamp of the last time this Memory has been shown to a Receiver.\r\nThis value is also used when picking random memories to avoid showing\r\nmemories that have already been shown recently.\r\n```Null``` if the Memory has not been shown yet.","format":"date-time","nullable":true},"readOccurrences":{"type":"integer","description":"Number of times this Memory has been shown to a Receiver.\r\n```Null``` if the Memory has not been shown yet.","format":"int32","nullable":true},"receiverID":{"type":"string","description":"ID of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public. When updating,\r\nset it to a single dash character (```-```) to remove a\r\npreviously set association with a Person.","nullable":true},"receiverTag":{"type":"string","description":"Tag of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public.","nullable":true},"receiverName":{"type":"string","description":"Name of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public.","nullable":true},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediumSpecs"},"description":"List of Medium objects associated with this Memory.\r\nMay be empty.","nullable":true},"title":{"type":"string","description":"Title of the Question or Story.\r\nNull if this Memory is a Default.","nullable":true},"titleVariants":{"type":"array","items":{"type":"string"},"description":"Title variants of this Question or Story.\r\nEmpty if this Memory is a Default.","nullable":true},"answers":{"type":"array","items":{"$ref":"#/components/schemas/AnswerSpecs"},"description":"List of its Answer objects.\r\nAt least one answer must be present.","nullable":true},"date":{"type":"string","description":"Approximate date associated with this Memory.\r\nWhen updating, set it to midnight Jan. 1st 1 A.D.\r\n(```01/01/01 00:00:00```) to clear any previously set\r\nDate and DateUncertaintyDays.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty in the date associated with this Memory,\r\nexpressed in days.","format":"double","nullable":true},"placeName":{"type":"string","description":"Name of the place associated with this Memory.\r\nWhen updating, set it to a single dash character\r\n(```-```) to clear any previously set Place (by name or\r\ncoordinates) and PlaceUncertaintyKm.","nullable":true},"placeLatitude":{"type":"number","description":"Latitude of the place associated with this Memory.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Longitude of the place associated with this Memory.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty of the place associated with this Memory,\r\nexpressed in kilometers.","format":"double","nullable":true},"conclusive":{"type":"boolean","description":"If ```True```, when this Memory is emitted it is NOT followed by a continuation prompt,\r\nsuch as \"Is there anything else you want to know?\".","nullable":true},"notPickable":{"type":"boolean","description":"If ```True```, this Memory can't be randomly picked with a Timeout Event, or\r\nexplicitly searching for random Memory objects.\r\nIgnored for Memory of type Default.","nullable":true},"help":{"type":"boolean","description":"If ```True```, this Memory's content can be emitted if the user fails\r\nto find a question with an answer at the beginning of a session.\r\nIgnored for Memory of type Default.","nullable":true},"hints":{"type":"array","items":{"type":"string"},"description":"Hints for this Memory.","nullable":true},"minTimeout":{"type":"number","description":"Minimum idle timeout, in seconds. If not specified, by default it is set to 20 seconds. <br> The idle timeout is the time after which the client sends a Timeout event and, typically, a random question or story is picked up and proposed to the user. The actual idle timeout is computed as a random number between <code>MinTimeout</code> and <code>MaxTimeout</code> plus the reading time, where the reading time is in turn computed as the time it would take to read the answer at 150 words per minute.","format":"double","nullable":true},"maxTimeout":{"type":"number","description":"Maximum idle timeout, in seconds. If not specified, by default it is set to 40 seconds. <br> The idle timeout is the time after which the client sends a Timeout event and, typically, a random question or story is picked up and proposed to the user. The actual idle timeout is computed as a random number between <code>MinTimeout</code> and <code>MaxTimeout</code> plus the reading time, where the reading time is in turn computed as the time it would take to read the answer at 150 words per minute.","format":"double","nullable":true},"contextVarsToSet":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"List of variable-value pairs to be used to alter the context when this Memory is matched.\r\nUse the special value ```-``` (a single dash character) to clear a context variable.","nullable":true},"contextVarsToMatch":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"List of variable-value pairs to be used to match this Memory with the context. If the context\r\ncontains a variable listed here, the value must match for the Memory to match.","nullable":true},"dcmOutcomeType":{"type":"string","description":"Optional type of the outcome to be sent to the DCM platform when this Memory is emitted.","nullable":true},"dcmOutcomeCode":{"type":"string","description":"Optional code of the outcome to be sent to the DCM platform when this Memory is emitted.","nullable":true},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for this Memory.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Memory object."},"MediumSpecs":{"type":"object","properties":{"mediumID":{"type":"string","description":"Medium object ID.","nullable":true},"url":{"type":"string","description":"URL of the Medium. If specified, the Content property must be ```Null```.\r\nUse this property to link large amounts of data stored externally.\r\nIf the amount of data is modest the Content property may be used as an alternative.","nullable":true},"content":{"type":"string","description":"Content of the Medium. If specified, the URL property must be ```Null```.\r\nDon't use this property to store large amounts of data. Can be used to store limited \r\ntext for a maximum of 10 KiB. For larger amounts store the data externally and link it\r\nvia the URL property.","nullable":true},"mimeType":{"type":"string","description":"MIME type of the Medium.\r\nRequired during Add operations.","nullable":true},"title":{"type":"string","description":"Title of the Medium.","nullable":true},"properties":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Key-value pairs for additional structured content storage.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Medium object."},"AnswerSpecs":{"type":"object","properties":{"text":{"type":"string","description":"Text of the Answer.\r\nRequired during Add operations.","nullable":true},"preformatted":{"type":"boolean","description":"If ```True```, when this Answer is emitted no reformatting is applied.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of an Answer object."}}}}
````

## Picks up to 5 random Memory objects.

> Random picking is performed using the same algorithm employed in the> \
> Timeout event of the R1 state of the Dialog State Machine.> \
> The algorithm takes into account the Memory's LastRead property,&#x20;> \
> to reduce the chances that a Memory that has just been read is> \
> picked up again too soon.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Random/{strSessionID}":{"post":{"tags":["Search"],"summary":"Picks up to 5 random Memory objects.","description":"Random picking is performed using the same algorithm employed in the\r\nTimeout event of the R1 state of the Dialog State Machine.\r\nThe algorithm takes into account the Memory's LastRead property, \r\nto reduce the chances that a Memory that has just been read is\r\npicked up again too soon.","operationId":"Search-GetRandomMemories","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Search specifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuerySpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRandomMemoriesResponse"}}}}}}}},"components":{"schemas":{"SearchQuerySpecs":{"type":"object","properties":{"text":{"type":"string","description":"Search query.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"searchType":{"type":"string","description":"How to interpret the search query in the Text property:<ul><li>If \"Semantic\", the query is interpreted as a full question in natural language,\r\n    and the search is performed in the same way a question would be posed to the\r\n    Dialog State Machine.</li><li>If \"Literal\", the query is intended as space-separated keywords,\r\n    and the search is performed by looking for them as a substring in the\r\n    text and titles of Memories.</li></ul>\r\nIf omitted the search is Semantic by default.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"date":{"type":"string","description":"Approximate date of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty of the date, in days.\r\nRequired if Date is specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeName":{"type":"string","description":"Name of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","nullable":true},"placeLatitude":{"type":"number","description":"Latitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Longitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty of place, in kilometers.\r\nRequired if PlaceName or PlaceLatitude and PlaceLongitude are specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"tag":{"type":"string","description":"Extends or limits the search to Memories associated with a Receiver with this tag,\r\ndepending on the API called:<ul><li>For Search, Random picking and Memory Hints, the search is <em>extended</em>\r\n    to Memories associated with a Receiver with this tag. If omitted the search is limited\r\n    to public Memories. As a special case, if the Giver tag is specified then the search is\r\n    extended to all Memories, whoever they are associated to.</li><li>For Filter Memories, the search is <em>limited</em> to Memories associated with a\r\n    Receiver with this tag.</li></ul>","nullable":true},"ignoreLastRead":{"type":"boolean","description":"If set to ```True```, recently picked Memories will not be deprioritized.\r\nThis means that a Memory never picked and a Memory picked just moments ago\r\nwill have the same probability to be picked again.\r\nIf omitted or set to ```False```, recently picked Memories\r\nwill be much less probable to be picked again.\r\nUsed only for Random picking.\r\nIgnored for Search, Filter Memories and Memory Hints.","nullable":true},"excludedMemoryIDs":{"type":"array","items":{"type":"string"},"description":"Optional list of Memory IDs that must be excluded from the search result.","nullable":true},"contextVars":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToMatch of Memories.\r\nUsed for Search, Filter Memories and Random picking and Memory Hints.","nullable":true},"contextVarsToSet":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToSet of Memories.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"memoryTags":{"type":"array","items":{"type":"string"},"description":"Optional list of memory tags. If specified, the search is limited to Memories\r\nincluding ALL the specified tags.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"numberOfResults":{"type":"integer","description":"Optional number of results. If omitted defaults to 5.","format":"int32","nullable":true},"startFrom":{"type":"integer","description":"Optional initial result index, 0-based. If omitted defaults to 0.\r\nUsed for Search, Filter Memories and Memory Hints.\r\nIgnored for Random picking.","format":"int32","nullable":true},"memoryType":{"type":"string","description":"Optional parameter, if set, filter returns only selected type of memories.\r\nUsed only for Filter Memories.","nullable":true},"withMediaOnly":{"type":"boolean","description":"Optional parameter, if set, filter returns only memories that contain media.\r\nUsed only for Filter Memories.","nullable":true}},"additionalProperties":false,"description":"Specifications for a Memory search."},"GetRandomMemoriesResponse":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/MemorySpecs"},"description":"List of Memory objects.\r\nMay be empty.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Random Memories request."},"MemorySpecs":{"type":"object","properties":{"memoryID":{"type":"string","description":"Memory object ID.","nullable":true},"memoryType":{"type":"string","description":"Memory type, e.g. <code>Question</code>, <code>Story</code> or <code>Default</code>. Required during Add operations. <br> Currently possible values are:<ul> <li><code>Question</code>: this Memory is a question, hence its title is expected in interrogative form</li> <li><code>Story</code>: this Memory is a story, hence its title is expected in affirmative form</li> <li><code>Default</code>: this Memory is a default answer, hence its title is ignored (empty or null)</li> <li><code>CompletionDraft</code>: this Memory is draft from a completion, obtained via a generative AI.</li> <li><code>ExpertReference</code>: this Memory is the results of a question asked to a Board of Experts, and the answer is the name of the Expert that replied to the question.</li> </ul>","nullable":true},"lastRead":{"type":"string","description":"Timestamp of the last time this Memory has been shown to a Receiver.\r\nThis value is also used when picking random memories to avoid showing\r\nmemories that have already been shown recently.\r\n```Null``` if the Memory has not been shown yet.","format":"date-time","nullable":true},"readOccurrences":{"type":"integer","description":"Number of times this Memory has been shown to a Receiver.\r\n```Null``` if the Memory has not been shown yet.","format":"int32","nullable":true},"receiverID":{"type":"string","description":"ID of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public. When updating,\r\nset it to a single dash character (```-```) to remove a\r\npreviously set association with a Person.","nullable":true},"receiverTag":{"type":"string","description":"Tag of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public.","nullable":true},"receiverName":{"type":"string","description":"Name of the Person object to whom this Memory belongs.\r\n```Null``` if the Memory is public.","nullable":true},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediumSpecs"},"description":"List of Medium objects associated with this Memory.\r\nMay be empty.","nullable":true},"title":{"type":"string","description":"Title of the Question or Story.\r\nNull if this Memory is a Default.","nullable":true},"titleVariants":{"type":"array","items":{"type":"string"},"description":"Title variants of this Question or Story.\r\nEmpty if this Memory is a Default.","nullable":true},"answers":{"type":"array","items":{"$ref":"#/components/schemas/AnswerSpecs"},"description":"List of its Answer objects.\r\nAt least one answer must be present.","nullable":true},"date":{"type":"string","description":"Approximate date associated with this Memory.\r\nWhen updating, set it to midnight Jan. 1st 1 A.D.\r\n(```01/01/01 00:00:00```) to clear any previously set\r\nDate and DateUncertaintyDays.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty in the date associated with this Memory,\r\nexpressed in days.","format":"double","nullable":true},"placeName":{"type":"string","description":"Name of the place associated with this Memory.\r\nWhen updating, set it to a single dash character\r\n(```-```) to clear any previously set Place (by name or\r\ncoordinates) and PlaceUncertaintyKm.","nullable":true},"placeLatitude":{"type":"number","description":"Latitude of the place associated with this Memory.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Longitude of the place associated with this Memory.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty of the place associated with this Memory,\r\nexpressed in kilometers.","format":"double","nullable":true},"conclusive":{"type":"boolean","description":"If ```True```, when this Memory is emitted it is NOT followed by a continuation prompt,\r\nsuch as \"Is there anything else you want to know?\".","nullable":true},"notPickable":{"type":"boolean","description":"If ```True```, this Memory can't be randomly picked with a Timeout Event, or\r\nexplicitly searching for random Memory objects.\r\nIgnored for Memory of type Default.","nullable":true},"help":{"type":"boolean","description":"If ```True```, this Memory's content can be emitted if the user fails\r\nto find a question with an answer at the beginning of a session.\r\nIgnored for Memory of type Default.","nullable":true},"hints":{"type":"array","items":{"type":"string"},"description":"Hints for this Memory.","nullable":true},"minTimeout":{"type":"number","description":"Minimum idle timeout, in seconds. If not specified, by default it is set to 20 seconds. <br> The idle timeout is the time after which the client sends a Timeout event and, typically, a random question or story is picked up and proposed to the user. The actual idle timeout is computed as a random number between <code>MinTimeout</code> and <code>MaxTimeout</code> plus the reading time, where the reading time is in turn computed as the time it would take to read the answer at 150 words per minute.","format":"double","nullable":true},"maxTimeout":{"type":"number","description":"Maximum idle timeout, in seconds. If not specified, by default it is set to 40 seconds. <br> The idle timeout is the time after which the client sends a Timeout event and, typically, a random question or story is picked up and proposed to the user. The actual idle timeout is computed as a random number between <code>MinTimeout</code> and <code>MaxTimeout</code> plus the reading time, where the reading time is in turn computed as the time it would take to read the answer at 150 words per minute.","format":"double","nullable":true},"contextVarsToSet":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"List of variable-value pairs to be used to alter the context when this Memory is matched.\r\nUse the special value ```-``` (a single dash character) to clear a context variable.","nullable":true},"contextVarsToMatch":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"List of variable-value pairs to be used to match this Memory with the context. If the context\r\ncontains a variable listed here, the value must match for the Memory to match.","nullable":true},"dcmOutcomeType":{"type":"string","description":"Optional type of the outcome to be sent to the DCM platform when this Memory is emitted.","nullable":true},"dcmOutcomeCode":{"type":"string","description":"Optional code of the outcome to be sent to the DCM platform when this Memory is emitted.","nullable":true},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for this Memory.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Memory object."},"MediumSpecs":{"type":"object","properties":{"mediumID":{"type":"string","description":"Medium object ID.","nullable":true},"url":{"type":"string","description":"URL of the Medium. If specified, the Content property must be ```Null```.\r\nUse this property to link large amounts of data stored externally.\r\nIf the amount of data is modest the Content property may be used as an alternative.","nullable":true},"content":{"type":"string","description":"Content of the Medium. If specified, the URL property must be ```Null```.\r\nDon't use this property to store large amounts of data. Can be used to store limited \r\ntext for a maximum of 10 KiB. For larger amounts store the data externally and link it\r\nvia the URL property.","nullable":true},"mimeType":{"type":"string","description":"MIME type of the Medium.\r\nRequired during Add operations.","nullable":true},"title":{"type":"string","description":"Title of the Medium.","nullable":true},"properties":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Key-value pairs for additional structured content storage.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of a Medium object."},"AnswerSpecs":{"type":"object","properties":{"text":{"type":"string","description":"Text of the Answer.\r\nRequired during Add operations.","nullable":true},"preformatted":{"type":"boolean","description":"If ```True```, when this Answer is emitted no reformatting is applied.","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"creationSessionID":{"type":"string","description":"ID of the session that created this object.","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Always present when reading/receiving\r\nan object, ignored when writing/sending an object.","format":"date-time","nullable":true},"lastChangeSessionID":{"type":"string","description":"ID of the latest session that changed this object.","nullable":true}},"additionalProperties":false,"description":"Specifications of an Answer object."}}}}
````

## Picks up to 20 Memory Hint objects.

> Picking is obtained by searching for Story objects with a date or> \
> place set, and clustering dates and places within an uncertainty> \
> of at least 1 year or at least 100 km.> \
> Each Memory Hint may either suggest a date or a place, but not both.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Hints/{strSessionID}":{"post":{"tags":["Search"],"summary":"Picks up to 20 Memory Hint objects.","description":"Picking is obtained by searching for Story objects with a date or\r\nplace set, and clustering dates and places within an uncertainty\r\nof at least 1 year or at least 100 km.\r\nEach Memory Hint may either suggest a date or a place, but not both.","operationId":"Search-GetMemoryHints","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Search specifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchQuerySpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMemoryHintsResponse"}}}}}}}},"components":{"schemas":{"SearchQuerySpecs":{"type":"object","properties":{"text":{"type":"string","description":"Search query.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"searchType":{"type":"string","description":"How to interpret the search query in the Text property:<ul><li>If \"Semantic\", the query is interpreted as a full question in natural language,\r\n    and the search is performed in the same way a question would be posed to the\r\n    Dialog State Machine.</li><li>If \"Literal\", the query is intended as space-separated keywords,\r\n    and the search is performed by looking for them as a substring in the\r\n    text and titles of Memories.</li></ul>\r\nIf omitted the search is Semantic by default.\r\nUsed only for Search and Filter Memories.\r\nIgnored for Random picking and Memory Hints.","nullable":true},"date":{"type":"string","description":"Approximate date of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty of the date, in days.\r\nRequired if Date is specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeName":{"type":"string","description":"Name of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","nullable":true},"placeLatitude":{"type":"number","description":"Latitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Longitude of the approximate place of Memories to limit the search to.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty of place, in kilometers.\r\nRequired if PlaceName or PlaceLatitude and PlaceLongitude are specified.\r\nUsed for Search, Filter Memories and Random picking.\r\nIgnored for Memory Hints.","format":"double","nullable":true},"tag":{"type":"string","description":"Extends or limits the search to Memories associated with a Receiver with this tag,\r\ndepending on the API called:<ul><li>For Search, Random picking and Memory Hints, the search is <em>extended</em>\r\n    to Memories associated with a Receiver with this tag. If omitted the search is limited\r\n    to public Memories. As a special case, if the Giver tag is specified then the search is\r\n    extended to all Memories, whoever they are associated to.</li><li>For Filter Memories, the search is <em>limited</em> to Memories associated with a\r\n    Receiver with this tag.</li></ul>","nullable":true},"ignoreLastRead":{"type":"boolean","description":"If set to ```True```, recently picked Memories will not be deprioritized.\r\nThis means that a Memory never picked and a Memory picked just moments ago\r\nwill have the same probability to be picked again.\r\nIf omitted or set to ```False```, recently picked Memories\r\nwill be much less probable to be picked again.\r\nUsed only for Random picking.\r\nIgnored for Search, Filter Memories and Memory Hints.","nullable":true},"excludedMemoryIDs":{"type":"array","items":{"type":"string"},"description":"Optional list of Memory IDs that must be excluded from the search result.","nullable":true},"contextVars":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToMatch of Memories.\r\nUsed for Search, Filter Memories and Random picking and Memory Hints.","nullable":true},"contextVarsToSet":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Optional context to be matched with ContextVarsToSet of Memories.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"memoryTags":{"type":"array","items":{"type":"string"},"description":"Optional list of memory tags. If specified, the search is limited to Memories\r\nincluding ALL the specified tags.\r\nUsed only for Filter Memories.\r\nIgnored for Search, Random picking and Memory Hints.","nullable":true},"numberOfResults":{"type":"integer","description":"Optional number of results. If omitted defaults to 5.","format":"int32","nullable":true},"startFrom":{"type":"integer","description":"Optional initial result index, 0-based. If omitted defaults to 0.\r\nUsed for Search, Filter Memories and Memory Hints.\r\nIgnored for Random picking.","format":"int32","nullable":true},"memoryType":{"type":"string","description":"Optional parameter, if set, filter returns only selected type of memories.\r\nUsed only for Filter Memories.","nullable":true},"withMediaOnly":{"type":"boolean","description":"Optional parameter, if set, filter returns only memories that contain media.\r\nUsed only for Filter Memories.","nullable":true}},"additionalProperties":false,"description":"Specifications for a Memory search."},"GetMemoryHintsResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of Memory Hint objects.","format":"int32"},"memoryHints":{"type":"array","items":{"$ref":"#/components/schemas/MemoryHintSpecs"},"description":"List of Memory Hint objects.\r\nMay be empty.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Memory Hints request."},"MemoryHintSpecs":{"type":"object","properties":{"date":{"type":"string","description":"Approximate date associated with one or more Story objects.\r\n```Null``` if this Memory Hint is a place hint.","format":"date-time","nullable":true},"dateUncertaintyDays":{"type":"number","description":"Uncertainty, expressed in days, of the date associated with one or more Story objects.\r\n```Null``` if this Memory Hint is a place hint.","format":"double","nullable":true},"placeLatitude":{"type":"number","description":"Approximate latitude of the place associated with one or more Story objects.\r\n```Null``` if this Memory Hint is a date hint.","format":"double","nullable":true},"placeLongitude":{"type":"number","description":"Approximate longitude of the place associated with one or more Story objects.\r\n```Null``` if this Memory Hint is a date hint.","format":"double","nullable":true},"placeUncertaintyKm":{"type":"number","description":"Uncertainty, expressed in Km, of the latitude and longitude of the place\r\nassociated with one or more Story objects.\r\n```Null``` if this Memory Hint is a date hint.","format":"double","nullable":true}},"additionalProperties":false,"description":"Specifications of a Memory Hint object."}}}}
````

## Gets a list of all available memory tags.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/MemoryTags/{strSessionID}":{"get":{"tags":["Search"],"summary":"Gets a list of all available memory tags.","description":"This API requires a Giver session.","operationId":"Search-ListMemoryTags","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMemoryTagsResponse"}}}}}}}},"components":{"schemas":{"GetMemoryTagsResponse":{"type":"object","properties":{"memoryTags":{"type":"array","items":{"type":"string"},"description":"The list of currently known Tags for the Memory object.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Memory Tags request"}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aisuru.com/api/engine/search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
