docs(api): document v5 response cleanup

This commit is contained in:
Soham Daga 2026-10-05 16:11:55 -07:00
parent 2a9399b6b5
commit 09a90b5542
4 changed files with 9 additions and 5 deletions

View file

@ -19,6 +19,8 @@ Pass `include` as a comma-separated list to return chunks, memories, or both. Ke
{"system":{"status":"done","createdAt":"...","updatedAt":"..."}}
```
`system.status` is one of `unknown`, `queued`, `extracting`, `chunking`, `embedding`, `indexing`, `done`, or `failed`.
### List documents, chunks, or memories
<CodeGroup>
@ -51,7 +53,7 @@ DELETE /ns/{namespace}/document
```
</CodeGroup>
The v5 array accepts 1–100 Supermemory or caller-defined IDs. Inspect both `deletedCount` and per-ID `errors`; HTTP success can include partial failures.
The v5 array accepts 1–100 Supermemory or caller-defined IDs. Inspect both `count` and per-ID `errors`; HTTP success can include partial failures.
### Forget memories

View file

@ -25,7 +25,7 @@ POST /ns/user_1/document?dreaming=dynamic
```
</CodeGroup>
The response remains an acceptance result with `id` and `status`. Repeating the v5 request with `id: "conv_1"` adds or diffs the new content into that document; it does not silently replace the canonical source.
The response remains an acceptance result with `id` and `status`. Its `status` is the document's processing state after the request: `queued` when new work was queued, otherwise the document's current state (for example `done` for an unchanged duplicate, or `failed` for a metadata-only update to a failed document). Possible values: `unknown`, `queued`, `extracting`, `chunking`, `embedding`, `indexing`, `done`, `failed`. Repeating the v5 request with `id: "conv_1"` adds or diffs the new content into that document; it does not silently replace the canonical source.
### Batch ingestion
@ -41,7 +41,7 @@ The response remains an acceptance result with `id` and `status`. Repeating the
Send the v5 body to `POST /ns/user_1/document/batch`. The array accepts 1–600 document objects. Namespace, `taskType`, and processing mode apply to the request; document content, ID, context, metadata, grouping, and date stay per item.
Batch results preserve input order. Inspect `success`, `failed`, and every item in `results`; a batch can contain successful and failed items together.
Batch results preserve input order. Inspect `count` (accepted), `failed`, and every item in `results`; each item's `status` is a processing state as above, or `error` when that item failed, and a batch can contain successful and failed items together.
### File ingestion
@ -54,7 +54,7 @@ Replace `POST /v3/documents/file` with `POST /ns/{namespace}/document/file`. Con
| `metadata`, `group` | JSON-encoded strings |
| `fileType`, `mimeType` | Query parameters when inference is insufficient |
The API acknowledges the file after durable acceptance. Extraction, indexing, and memory formation continue asynchronously; poll the document rather than assuming the first response means processing is complete.
The API acknowledges the file after durable acceptance, with `status` set as for a JSON add. Extraction, indexing, and memory formation continue asynchronously; poll the document rather than assuming the first response means processing is complete.
### Processing choices

View file

@ -17,6 +17,7 @@ Record each legacy request, v5 request, expected semantic result, and intentiona
- Document includes are absent when omitted and empty arrays when requested without results.
- Unified list responses populate only the selected resource array.
- `metadata` is always an object, `{}` when empty; it is never `null`.
- Search parity uses explicit v4-equivalent mode and threshold before testing v5 defaults.
- Profiles always contain static, dynamic, and bucket sections.

View file

@ -63,9 +63,10 @@ Legacy `include.chunks` has no v5 equivalent. Choose `chunks` or `hybrid` instea
| --- | --- |
| Result array | `results` |
| Timing | `searchTime` |
| Source expansion | `result.included.document` |
| Source expansion | `result.included.document`, with timestamps under its `system` |
| Related context | `result.included.related.{parents,children,siblings}` |
| Lifecycle fields | `result.system` |
| Version and inference flags | `result.isLatest`, `result.isInference` |
Each primary result contains either `memory`, `chunk`, or both only if the contract allows it. Branch on field presence rather than assuming one result shape.