API Reference
Memory Graph
Read the nodes and typed edges connecting this end user's memories.
Endpoint and query parameters
GET/memory/graph
200 OK
| Parameter | Type | Contract |
|---|---|---|
limit | integer | Optional node ceiling. |
memory_id | integer | Optional; centre the graph on one memory. |
depth | integer | Optional traversal depth from that centre. |
Read the graph
import osfrom memorysync import MemorySyncClientclient = MemorySyncClient(api_key=os.environ["MEMORYSYNC_API_KEY"],base_url="https://api.memorysync.io",project_id=os.environ["MEMORYSYNC_PROJECT_ID"],end_user_id="usr_7f3a9c2e",)graph = client.graph(limit=100)
Result handling
Returns nodes and edges suitable for rendering. Edge types come from the organization vocabulary, so a custom relation type appears here once added. The SDKs return the payload unmodified.
Errors and next action
An unknown memory_id yields an empty or centre-less graph rather than an error. Correct 4xx request problems.