# Media

## Lists all Medium objects of a Memory.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Media/{strSessionID}/{strMemoryID}":{"get":{"tags":["Media"],"summary":"Lists all Medium objects of a Memory.","description":"This API requires a Giver session.","operationId":"Media-ListMedia","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"strMemoryID","in":"path","description":"The Memory object ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMediaResponse"}}}}}}}},"components":{"schemas":{"ListMediaResponse":{"type":"object","properties":{"media":{"type":"array","items":{"$ref":"#/components/schemas/MediumSpecs"},"description":"List of Medium 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 List Media request."},"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."}}}}
````

## Removes all Medium objects from a Memory.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Media/{strSessionID}/{strMemoryID}":{"delete":{"tags":["Media"],"summary":"Removes all Medium objects from a Memory.","description":"This API requires a Giver session.","operationId":"Media-RemoveMedia","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"strMemoryID","in":"path","description":"The Memory object ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"Response":{"type":"object","properties":{"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":"Base response."}}}}
````

## Gets the details of a Medium object of a Memory.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Medium/{strSessionID}/{strMemoryID}/{strMediumID}":{"get":{"tags":["Media"],"summary":"Gets the details of a Medium object of a Memory.","description":"This API requires a Giver session.","operationId":"Media-GetMedium","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"strMemoryID","in":"path","description":"The Memory object ID","required":true,"schema":{"type":"string"}},{"name":"strMediumID","in":"path","description":"The Medium object ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMediumResponse"}}}}}}}},"components":{"schemas":{"GetMediumResponse":{"type":"object","properties":{"medium":{"$ref":"#/components/schemas/MediumSpecs"},"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 Medium request."},"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."}}}}
````

## Removes an existing Medium object from a Memory.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Medium/{strSessionID}/{strMemoryID}/{strMediumID}":{"delete":{"tags":["Media"],"summary":"Removes an existing Medium object from a Memory.","description":"This API requires a Giver session.","operationId":"Media-RemoveMedium","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"strMemoryID","in":"path","description":"The Memory object ID","required":true,"schema":{"type":"string"}},{"name":"strMediumID","in":"path","description":"The Medium object ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"Response":{"type":"object","properties":{"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":"Base response."}}}}
````

## Updates an existing Medium object of a Memory.

> This API requires a Giver session.> \
> Only non-null (present) fields are considered for update.> \
> Null or absent fields are left unaltered.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Medium/{strSessionID}/{strMemoryID}/{strMediumID}":{"patch":{"tags":["Media"],"summary":"Updates an existing Medium object of a Memory.","description":"This API requires a Giver session.\r\nOnly non-null (present) fields are considered for update.\r\nNull or absent fields are left unaltered.","operationId":"Media-UpdateMedia","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"strMemoryID","in":"path","description":"The Memory object ID","required":true,"schema":{"type":"string"}},{"name":"strMediumID","in":"path","description":"The Medium object ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The Medium object specifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMediumSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"UpdateMediumSpecs":{"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},"Response":{"type":"object","properties":{"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":"Base response."}}}}
````

## Adds a new Medium object to a Memory.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/Medium/{strSessionID}/{strMemoryID}":{"post":{"tags":["Media"],"summary":"Adds a new Medium object to a Memory.","description":"This API requires a Giver session.","operationId":"Media-AddMedia","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"strMemoryID","in":"path","description":"The Memory object ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The Medium object specifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediumSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMediumResponse"}}}}}}}},"components":{"schemas":{"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."},"AddMediumResponse":{"type":"object","properties":{"mediumID":{"type":"string","description":"Medium object ID.","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 an Add Medium 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/media.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.
