SmartMemory
GET
/memory/{item_id}/lineage

Walk the derived_from chain from item to root.

Returns a list of items from the given item back to the root (item with no derived_from). Max depth 20 to prevent infinite loops.

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The token is either a Clerk session JWT or a SmartMemory API key (prefix sm_live_, sm_test_, or legacy sk_).

In: header

Path Parameters

item_id*Item Id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/memory/string/lineage"
null
{
  "detail": {
    "code": "invalid_scoped_validity",
    "message": "string",
    "retryable": false
  }
}
{
  "detail": {
    "code": "invalid_scoped_validity",
    "message": "string",
    "retryable": false
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "detail": {
    "code": "invalid_scoped_validity",
    "message": "string",
    "retryable": false
  }
}