# Asset

## POST /api/v2/Asset/{strToken}/{strMemoriID}/{strEngineMemoryID}

> Uploads a file and creates a new Asset object to access it.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/Asset/{strToken}/{strMemoriID}/{strEngineMemoryID}":{"post":{"tags":["Asset"],"summary":"Uploads a file and creates a new Asset object to access it.","operationId":"Asset-UploadAsset","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"strMemoriID","in":"path","description":"The optional ID of a Memori object the Asset belongs to","schema":{"type":"string"}},{"name":"strEngineMemoryID","in":"path","description":"The optional ID of an Engine Memory object the Asset belongs to","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAssetResponse"}}}}}}}},"components":{"schemas":{"UploadAssetResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/AssetSpecs"},"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 reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of an Upload Asset request."},"AssetSpecs":{"type":"object","properties":{"assetID":{"type":"string","description":"Asset ID. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"assetURL":{"type":"string","description":"Public URL of the Asset file. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"mimeType":{"type":"string","description":"Extrapolated MIME type.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"originalFileName":{"type":"string","description":"Original name of the uploaded file, without the extension.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"memoriID":{"type":"string","description":"Optional ID of the Memori object this Asset belongs to.\r\nMay be empty for assets not belonging to a Memori object.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"remoteSessionCheck":{"type":"boolean","description":"Optional flag to protect resource downloads with remote session control.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"engineMemoryID":{"type":"string","description":"Optional ID of the Memory object on the Memori Engine.\r\nMay be empty for public assets. \r\nReturned during Upload operations.\r\nUsed during Update operations. To clear this property during an\r\nUpdate operation set it to a single dash character (\"-\").","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Specifications of an Asset object."}}}}
````

## GET /api/v2/AssetDetails/{strToken}/{fileName}

> Gets the details of an Asset object.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/AssetDetails/{strToken}/{fileName}":{"get":{"tags":["Asset"],"summary":"Gets the details of an Asset object.","operationId":"Asset-GetAssetDetails","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"fileName","in":"path","description":"Name of the Asset file","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/GetAssetDetailsResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/GetAssetDetailsResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetAssetDetailsResponse"}}}}}}}},"components":{"schemas":{"GetAssetDetailsResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/AssetSpecs"},"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 reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Asset Details request."},"AssetSpecs":{"type":"object","properties":{"assetID":{"type":"string","description":"Asset ID. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"assetURL":{"type":"string","description":"Public URL of the Asset file. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"mimeType":{"type":"string","description":"Extrapolated MIME type.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"originalFileName":{"type":"string","description":"Original name of the uploaded file, without the extension.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"memoriID":{"type":"string","description":"Optional ID of the Memori object this Asset belongs to.\r\nMay be empty for assets not belonging to a Memori object.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"remoteSessionCheck":{"type":"boolean","description":"Optional flag to protect resource downloads with remote session control.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"engineMemoryID":{"type":"string","description":"Optional ID of the Memory object on the Memori Engine.\r\nMay be empty for public assets. \r\nReturned during Upload operations.\r\nUsed during Update operations. To clear this property during an\r\nUpdate operation set it to a single dash character (\"-\").","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Specifications of an Asset object."}}}}
````

## GET /api/v2/Assets/{strToken}

> Gets a list of Asset objects owned the currently logged in User.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/Assets/{strToken}":{"get":{"tags":["Asset"],"summary":"Gets a list of Asset objects owned the currently logged in User.","operationId":"Asset-ListAssets","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssetsResponse"}}}}}}}},"components":{"schemas":{"ListAssetsResponse":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/AssetSpecs"},"description":"The list of Asset objects.","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 reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a List Assets request."},"AssetSpecs":{"type":"object","properties":{"assetID":{"type":"string","description":"Asset ID. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"assetURL":{"type":"string","description":"Public URL of the Asset file. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"mimeType":{"type":"string","description":"Extrapolated MIME type.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"originalFileName":{"type":"string","description":"Original name of the uploaded file, without the extension.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"memoriID":{"type":"string","description":"Optional ID of the Memori object this Asset belongs to.\r\nMay be empty for assets not belonging to a Memori object.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"remoteSessionCheck":{"type":"boolean","description":"Optional flag to protect resource downloads with remote session control.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"engineMemoryID":{"type":"string","description":"Optional ID of the Memory object on the Memori Engine.\r\nMay be empty for public assets. \r\nReturned during Upload operations.\r\nUsed during Update operations. To clear this property during an\r\nUpdate operation set it to a single dash character (\"-\").","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Specifications of an Asset object."}}}}
````

## GET /api/v1/CloudAsset/{assetID}

> Downloads a file from an old Cloud asset file URL, such as> \
> \`\`\`cloud://\<path>/\<assetID>.\<ext>\`\`\`.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v1/CloudAsset/{assetID}":{"get":{"tags":["Asset"],"summary":"Downloads a file from an old Cloud asset file URL, such as\r\n```cloud://<path>/<assetID>.<ext>```.","operationId":"Asset-DownloadOldCloudAsset","parameters":[{"name":"assetID","in":"path","description":"ID of the old Cloud asset file","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}}}}
````

## GET /api/v1/memoriai/memory/media/cloud/{assetID}

> Downloads a file from an old asset file URL, such as> \
> \`\`\`/api/v1/memoriai/memory/media/cloud/\<path>/\<assetID>.\<ext>\`\`\`.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v1/memoriai/memory/media/cloud/{assetID}":{"get":{"tags":["Asset"],"summary":"Downloads a file from an old asset file URL, such as\r\n```/api/v1/memoriai/memory/media/cloud/<path>/<assetID>.<ext>```.","operationId":"Asset-DownloadOldAsset","parameters":[{"name":"assetID","in":"path","description":"ID of the old asset file","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}}}}
````

## GET /api/v1/memoriai/memory/{strMemoryID}/media/cloud/{assetID}

> Downloads a file from an old asset file URL, such as> \
> \`\`\`/api/v1/memoriai/memory/\<memoryID>/media/cloud/\<path>/\<assetID>.\<ext>\`\`\`.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v1/memoriai/memory/{strMemoryID}/media/cloud/{assetID}":{"get":{"tags":["Asset"],"summary":"Downloads a file from an old asset file URL, such as\r\n```/api/v1/memoriai/memory/<memoryID>/media/cloud/<path>/<assetID>.<ext>```.","operationId":"Asset-DownloadOldAssetWithMemoryCheck","parameters":[{"name":"strMemoryID","in":"path","description":"ID of the engine Memory object","required":true,"schema":{"type":"string"}},{"name":"assetID","in":"path","description":"ID of the old asset file","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}}}}
````

## GET /api/v1/memoriai/memori/cover/{strMemoriID}

> Downloads the cover file from an old cover asset URL, sucs as> \
> \`\`\`/api/v1/memoriai/memori/cover/\<memoriID>\`\`\`.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v1/memoriai/memori/cover/{strMemoriID}":{"get":{"tags":["Asset"],"summary":"Downloads the cover file from an old cover asset URL, sucs as\r\n```/api/v1/memoriai/memori/cover/<memoriID>```.","operationId":"Asset-DownloadOldCoverAsset","parameters":[{"name":"strMemoriID","in":"path","description":"ID of the engine Memori object","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}}}}
````

## GET /api/v1/memoriai/memori/avatar/{strMemoriID}

> Downloads the avatar file from an old avatar asset URL, sucs as> \
> \`\`\`/api/v1/memoriai/memori/avatar/\<memoriID>\`\`\`.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v1/memoriai/memori/avatar/{strMemoriID}":{"get":{"tags":["Asset"],"summary":"Downloads the avatar file from an old avatar asset URL, sucs as\r\n```/api/v1/memoriai/memori/avatar/<memoriID>```.","operationId":"Asset-DownloadOldAvatarAsset","parameters":[{"name":"strMemoriID","in":"path","description":"ID of the engine Memori object","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}}}}
````

## Downloads a file from an Asset object.

> The fileName parameter supports specifying a resize format by appending '@{format}' before the extension (e.g., '<assetId@32x32.png>').> \
> The following formats are supported:> \
> \<ul>\<li>\`\`\`favicon\`\`\` (16x16) \</li>\<li>\`\`\`16x16\`\`\`\</li>\<li>\`\`\`32x32\`\`\`\</li>\<li>\`\`\`180x180\`\`\`\</li>\<li>\`\`\`192x192\`\`\`\</li>\<li>\`\`\`300x300\`\`\`\</li>\<li>\`\`\`512x512\`\`\`\</li>\</ul>

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/Asset/{fileName}/{strMemoriSessionID}":{"get":{"tags":["Asset"],"summary":"Downloads a file from an Asset object.","description":"The fileName parameter supports specifying a resize format by appending '@{format}' before the extension (e.g., 'assetId@32x32.png').\r\nThe following formats are supported:\r\n<ul><li>```favicon``` (16x16) </li><li>```16x16```</li><li>```32x32```</li><li>```180x180```</li><li>```192x192```</li><li>```300x300```</li><li>```512x512```</li></ul>","operationId":"Asset-DownloadAsset","parameters":[{"name":"fileName","in":"path","description":"Name of the Asset file","required":true,"schema":{"type":"string"}},{"name":"strMemoriSessionID","in":"path","description":"Optional ID of an Engine Memori session","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}}}}
````

## DELETE /api/v2/Asset/{strToken}/{fileName}

> Deletes a file and its corresponding Asset object.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/Asset/{strToken}/{fileName}":{"delete":{"tags":["Asset"],"summary":"Deletes a file and its corresponding Asset object.","operationId":"Asset-DeleteAsset","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"fileName","in":"path","description":"Name of the Asset file","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 reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Base response."}}}}
````

## PATCH /api/v2/Asset/{strToken}/{fileName}

> Updates an Asset object.

````json
{"openapi":"3.0.1","info":{"title":"Memori.ai Web API V2","version":"v2"},"paths":{"/api/v2/Asset/{strToken}/{fileName}":{"patch":{"tags":["Asset"],"summary":"Updates an Asset object.","operationId":"Asset-UpdateAsset","parameters":[{"name":"strToken","in":"path","description":"The login token","required":true,"schema":{"type":"string"}},{"name":"fileName","in":"path","description":"Name of the Asset file","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The Asset specifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetResponse"}}}}}}}},"components":{"schemas":{"AssetSpecs":{"type":"object","properties":{"assetID":{"type":"string","description":"Asset ID. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"assetURL":{"type":"string","description":"Public URL of the Asset file. Unique and assigned by the system.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"mimeType":{"type":"string","description":"Extrapolated MIME type.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"originalFileName":{"type":"string","description":"Original name of the uploaded file, without the extension.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"memoriID":{"type":"string","description":"Optional ID of the Memori object this Asset belongs to.\r\nMay be empty for assets not belonging to a Memori object.\r\nReturned during Upload operations.\r\nIgnored in other cases.","nullable":true},"remoteSessionCheck":{"type":"boolean","description":"Optional flag to protect resource downloads with remote session control.\r\nReturned during Upload operations.\r\nUsed during Update operations.","nullable":true},"engineMemoryID":{"type":"string","description":"Optional ID of the Memory object on the Memori Engine.\r\nMay be empty for public assets. \r\nReturned during Upload operations.\r\nUsed during Update operations. To clear this property during an\r\nUpdate operation set it to a single dash character (\"-\").","nullable":true},"creationTimestamp":{"type":"string","description":"Timestamp of creation. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true},"lastChangeTimestamp":{"type":"string","description":"Timestamp of latest change. Returned during Get operations.\r\nIgnored in other cases.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Specifications of an Asset object."},"UpdateAssetResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/AssetSpecs"},"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 reponse.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous reponse.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is indicative of the actual\r\nerror.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of an Update Asset 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/backend/asset.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.
