API Coverage Report
Complete overview of all documented API endpoints in SveltyCMS and their documentation status.
On this page
1. The Goal
Maintain transparency regarding the documentation status of the SveltyCMS API ecosystem. This report serves as a live audit of endpoint documentation, SDK parity, and database-agnostic verification.
2. The Solution
📊 Coverage Statistics
| Metric | Status |
|---|---|
| Handler Modules | 15 / 15 |
| Documented Endpoints | High |
| Local SDK Parity | 100% |
| Unified Dispatcher Sync | 1:1 Parity |
✅ Handler Documentation Status
| Handler File | MDX Documentation | Local SDK Equivalent | Status |
|---|---|---|---|
| auth.ts | Reference | locals.cms.auth |
✅ Complete |
| collections.ts | Reference | locals.cms.collections |
✅ Complete |
| content.ts | Reference | locals.cms.collections |
✅ Complete |
| dashboard.ts | Reference | locals.cms.dashboard |
✅ Complete |
| media.ts | Reference | locals.cms.media |
✅ Complete |
| scim.ts | Reference | N/A | ✅ Complete |
| setup.ts | Reference | setupManager |
✅ Complete |
| system.ts | Reference | locals.cms.system |
✅ Complete |
| tokens.ts | Reference | locals.cms.tokens |
✅ Complete |
| utility.ts | Reference | locals.cms.system |
✅ Complete |
| testing.ts | — | N/A | ❌ Undocumented |
| database.ts | — | N/A | ❌ Undocumented |
| logs.ts | — | N/A | ❌ Undocumented |
| api-keys.ts | — | N/A | ❌ Undocumented |
| version.ts | — | N/A | ❌ Undocumented |
Dashboard Endpoint Mapping
The dashboard handler provides 10 endpoints powering 16 UI widgets:
| Endpoint | Widgets Using It |
|---|---|
/api/dashboard/stats |
Unified Metrics, Database Pool |
/api/dashboard/health |
System Health, Database Pool |
/api/dashboard/metrics |
Unified Metrics, Performance, Security |
/api/dashboard/system-info |
CPU, Memory, Disk widgets |
/api/dashboard/logs |
Audit Log, Activity Logs |
/api/dashboard/cache-metrics |
Cache Monitor |
/api/dashboard/last5-content |
Last 5 Content |
/api/dashboard/last5media |
Last 5 Media |
/api/dashboard/online-user |
Online Users |
/api/dashboard/system-messages |
System Messages |
3. The Mechanics
Documentation Integrity
The API documentation is verified against the actual handler implementations. Every PR that modifies a file in src/routes/api/[...path]/handlers/ should include a corresponding update to its .mdx reference in docs/api/.
Verification Strategy
- Manual Audit: Cross-reference documented endpoints against handler switch-case statements.
- SDK Parity: Ensures every REST endpoint has a corresponding
locals.cmsmethod for SSR. - Widget Mapping: Dashboard widget data sources are verified against handler capabilities.
Summary: 10/15 handler modules documented (5 undocumented: testing, database, logs, api-keys, version). All endpoint paths verified against actual code. All security gating verified — no remaining gaps.