Find path

Find the shortest path between two memories.

GET/api/v1/graph/path

Query Parameters

from_idstringrequired

Starting memory ID

to_idstringrequired

Target memory ID

API Key

Stored locally, never sent to servers

Find path
const options = {  method: 'GET',  headers: {'X-API-Key': 'mb_live_xxx'},};fetch('https://api.mem-brain.io/api/v1/graph/path', options)  .then(res => res.json())  .then(res => console.log(res))  .catch(err => console.error(err));
{
"path": [
{
"id": "mem_aaa",
"content": "..."
},
{
"id": "mem_bbb",
"content": "..."
}
],
"edges": [
{
"source": "mem_aaa",
"target": "mem_bbb"
}
]
}