---
title: "Find a memory or a source"
method: GET
path: "/api/v1/trace/roots"
tags: ["debugging"]
---

# Find a memory or a source

`GET /api/v1/trace/roots`

## Request

- Base URL: `https://api.past.dev`
- URL: `https://api.past.dev/api/v1/trace/roots`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Memories and sources matching a search, newest first, in two paged groups. Each entry's id is what the lineage and timeline reads take as a root.

## Query parameters

- `search` string
- `ingestionId` string, uuid
- `first` integer
- `afterMemories` string
- `afterSources` string

## Response `200`

Two paged groups: memories and sources.

- TraceRoots
  - `memories` TraceRootGroup, required
    - `entries` TraceNode[], required
      - `id` string, uuid, required
      - `kind` 'memory' | 'source', required
      - `headline` string, required
      - `memoryKind` string, nullable: The kind of the memory, as artifact.kind on a recall result: observation, claim, rule, membership, identity, mention or temporal-anchor. Null for a source.
      - `dataPointId` string, nullable
      - `revision` integer, nullable
      - `occurredAt` string, date-time, required
      - `createdAt` string, date-time, required
      - `readyAt` string, date-time, nullable: When it became searchable.
      - `validFrom` string, date-time, nullable
      - `validTo` string, date-time, nullable
      - `current` boolean, required
      - `replacedId` string, uuid, nullable
      - `inputCount` integer, required
      - `outputCount` integer, required
      - `phase` 'queued' | 'processing' | 'captured' | 'indexed' | 'failed' | 'nothing-changed' | 'null', nullable
      - `requestId` string, nullable
      - `content` string, nullable: A source's text, cut to 4,000 characters.
      - `contentTruncated` boolean, nullable
    - `totalCount` integer, required
    - `hasMore` boolean, required
    - `endCursor` string, nullable, required
  - `sources` TraceRootGroup, required
    - `entries` TraceNode[], required
      - `id` string, uuid, required
      - `kind` 'memory' | 'source', required
      - `headline` string, required
      - `memoryKind` string, nullable: The kind of the memory, as artifact.kind on a recall result: observation, claim, rule, membership, identity, mention or temporal-anchor. Null for a source.
      - `dataPointId` string, nullable
      - `revision` integer, nullable
      - `occurredAt` string, date-time, required
      - `createdAt` string, date-time, required
      - `readyAt` string, date-time, nullable: When it became searchable.
      - `validFrom` string, date-time, nullable
      - `validTo` string, date-time, nullable
      - `current` boolean, required
      - `replacedId` string, uuid, nullable
      - `inputCount` integer, required
      - `outputCount` integer, required
      - `phase` 'queued' | 'processing' | 'captured' | 'indexed' | 'failed' | 'nothing-changed' | 'null', nullable
      - `requestId` string, nullable
      - `content` string, nullable: A source's text, cut to 4,000 characters.
      - `contentTruncated` boolean, nullable
    - `totalCount` integer, required
    - `hasMore` boolean, required
    - `endCursor` string, nullable, required

## Other responses

- `400`: The request is malformed or violates a field constraint. Match behavior on the response code field.
- `401`: missing-api-key: no bearer. malformed-api-key: the header or the key has the wrong shape, or an agent token was sent to a route that accepts keys only. unauthorized: the key is unknown, expired, revoked, or of the kind this route refuses, or the agent token is invalid or expired.
- `403`: project-archived: the project of the key, or the project an agent token names, is archived. Unarchive it in the console to resume. insufficient-scope: the agent token does not carry the scope of the route.
- `429`: The plan's requests per minute are exceeded. This refusal carries no body.
- `default`: Any other failure uses the same JSON error envelope.

---

[API](https://skmtc.dev/past/apis/past-dev-memory-api.md) · [All operations](https://skmtc.dev/past/apis/past-dev-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/past/apis/past-dev-memory-api/revisions/3ddccc19f0eb?raw)
