mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-08 03:08:21 +00:00
docs(api): document paginated v5 namespace list (#1769)
Docs for supermemoryai/mono#3420: `GET /namespaces` returns `{namespaces, pagination}` (newest first, `limit` up to 100), and the SDK note now describes `namespaces.list()` and both delete outcomes (`status: "deleted"` / `"queued"`) correctly. Also rewrites the memory GET and batch-result descriptions so they no longer refer to other endpoints.
This commit is contained in:
parent
672defc08b
commit
58ef43ba5c
4 changed files with 5 additions and 5 deletions
|
|
@ -27,7 +27,7 @@ Pass `include` as a comma-separated list to return chunks, memories, or both. Ke
|
|||
GET /ns/{namespace}/memories/{id}?include=related,documents&relatedLimit=10
|
||||
```
|
||||
|
||||
Returns one memory in the same shape as list memories. A memory from another namespace returns `404`; a forgotten memory, or one past its `forget_after`, is still returned with `isForgotten: true`.
|
||||
Returns one memory with `id`, `memory`, `metadata`, `isStatic`, `isInference`, `isLatest`, `isForgotten`, `version`, and `system.createdAt/updatedAt`. A memory from another namespace returns `404`; a forgotten memory, or one past its `forget_after`, is still returned with `isForgotten: true`.
|
||||
|
||||
- `include=related` adds `included.related.parents` (earlier versions), `children` (newer versions), and `siblings` (memories connected by `extends` or `derives`). Each list walks outward from the memory until it holds `relatedLimit` items (default `10`, maximum `100`). Forgotten memories and memories in other namespaces are left out.
|
||||
- `include=documents` adds `included.document`, the most recently updated source document. With both values, every related memory also carries its own `document`.
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ The response remains an acceptance result with `id` and `status`. Its `status` i
|
|||
|
||||
Send the v5 body to `POST /ns/user_1/document/batch`. The array accepts 1–600 document objects. `taskType` and `dreaming` sit at the top level of the body, next to `documents`, and apply to every item; document content, ID, context, metadata, grouping, and date stay per item.
|
||||
|
||||
`results` lists accepted documents first, in request order, then failed ones; match each result by `id`, or by `url` for a failed item with no ID. 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.
|
||||
`results` lists accepted documents first, in request order, then failed ones; match each result by `id`, or by `url` for a failed item with no ID. Inspect `count` (accepted), `failed`, and every item in `results`; each item's `status` is the document's processing state (`unknown`, `queued`, `extracting`, `chunking`, `embedding`, `indexing`, `done`, or `failed`), or `error` when that item failed, and a batch can contain successful and failed items together.
|
||||
|
||||
### File ingestion
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ v5 renames the public isolation boundary from container tag to namespace. Existi
|
|||
|
||||
### List namespaces
|
||||
|
||||
Each entry now exposes `id`, `namespace`, `documentCount`, `memoryCount`, nullable `description`, and `system.createdAt/updatedAt`. Update readers that still expect `containerTag`, flat timestamps, or unbounded internal settings.
|
||||
The list is paginated: `GET /namespaces?page=1&limit=10` returns `{namespaces, pagination}`, newest first, with `limit` up to 100. Each entry now exposes `id`, `namespace`, `documentCount`, `memoryCount`, nullable `description`, and `system.createdAt/updatedAt`. Update readers that still expect `containerTag`, flat timestamps, or unbounded internal settings.
|
||||
|
||||
### Read and update settings
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ await supermemory.namespaces.delete("project_alpha", {
|
|||
```
|
||||
</CodeGroup>
|
||||
|
||||
`namespaces.list()` returns an array of `{ id, namespace, documentCount, memoryCount, description, system }`. A delete without `moveTo` returns final counts; with `moveTo` it returns `{ success, status: "queued", operationId, namespace, moveTo }`.
|
||||
`namespaces.list()` returns `{ namespaces, pagination }`, where each namespace is `{ id, namespace, documentCount, memoryCount, description, system }`. A delete without `moveTo` returns `{ status: "deleted", namespace, deletedDocumentsCount, deletedMemoriesCount }`; with `moveTo` it returns `{ status: "queued", operationId, namespace, moveTo }`.
|
||||
|
||||
### Verification
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,6 @@ await supermemory.organization.update({
|
|||
|
||||
- Compare the v5 context with the legacy `filterPrompt` before cutover.
|
||||
- Set, replace, and clear organizational context.
|
||||
- Confirm `namespaceCount` agrees with `GET /namespaces` for the same credentials.
|
||||
- Confirm `namespaceCount` agrees with `pagination.totalItems` from `GET /namespaces` for the same credentials.
|
||||
- Verify non-admin callers receive `403` on PATCH.
|
||||
- Confirm removed fields are not required by downstream configuration code.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue