Files

1.2 KiB

layout, title, parent, grand_parent, nav_order
layout title parent grand_parent nav_order
default Delete memory Memory APIs ML APIs 30

Delete Memory API

Introduced 2.12 {: .label .label-purple }

Use this API to delete a memory based on the memory_id.

When the Security plugin is enabled, all memories exist in a private security mode. Only the user who created a memory can interact with that memory and its messages. {: .important}

Endpoints

DELETE /_plugins/_ml/memory/{memory_id}

Path parameters

The following table lists the available path parameters.

Parameter Data type Description
memory_id String The ID of the memory to be deleted.

Example request

DELETE /_plugins/_ml/memory/MzcIJX8BA7mbufL6DOwl

{% include copy-curl.html %}

Example response

{
  "success": true
}

Error responses

If you attempt to delete a memory that doesn't exist, OpenSearch returns a 404 error:

{
  "error": {
    "root_cause": [
      {
        "type": "resource_not_found_exception",
        "reason": "Memory [MzcIJX8BA7mbufL6DOwl] not found"
      }
    ],
    "type": "resource_not_found_exception",
    "reason": "Memory [MzcIJX8BA7mbufL6DOwl] not found"
  },
  "status": 404
}