Knowledge Bases
List all knowledge-base entries for a target (flat, cross-KB)
Flat, cross-KB list of every entry on the target's (non-hidden, non-mongodb) knowledge bases, each tagged with its source KB `id`/`kind`. Pass `kb_id` to narrow to a single knowledge base. `q` matches (case-insensitive substring) against an entry's `title`. `sort` accepts `title` and `created_at` (default, newest first).
Aggregate knowledge-base entry counts, by type
Counts only, for the tasks overview's resource-coverage donut denominator โ the widget computes its own percentages client-side from `total` and `by_type`. Takes no query params. No wildcard route can shadow `aggregates` here (the target-wide entries route is the bare `/knowledge-base-entries`; per-KB entries live under `/knowledge-bases/{kb_id}/entries`), but the route is registered adjacent to its sibling anyway.
List knowledge bases
`KB` has no display-name field yet, so sorting/searching by name is not available here (only `created_at`, default newest first).
Create a knowledge base by crawling a site
Spectral starts at `url` and follows links up to `max_pages`. Returns the new knowledge base + a pollable job.
Create a knowledge base from uploaded files
Upload one or more documents as multipart `files`. Scalar options (e.g. `language`) are passed as query params, not in the body. The total request payload (all files combined) may not exceed 30 MB. Returns the new knowledge base + a pollable job.
Create a knowledge base from a URL list
Ingests exactly the `urls` provided (no crawling). Returns the new knowledge base + a pollable job.
Delete a knowledge base
Delete a knowledge base
Get a knowledge base
Get a knowledge base
Check whether a crawl or URL-list KB's sources have changed
Probes each entry's source URL (HEAD `Last-Modified`, falling back to a GET content-similarity check) and persists `last_checked_at`. Only supported for `crawl` and `urls` knowledge bases โ `409` for `file_upload` KBs.
List knowledge base entries
`q` matches (case-insensitive substring) against an entry's `title`. `sort` accepts `title` and `created_at` (default, newest first).
Get a presigned read URL for a file-type entry
Returns a time-limited GCS read URL. 409 for entries whose `type` is not `file`.