GET /docs

RS2 documentation

Start with the manual if you are building or operating an RS2 application. The runtime notes go deeper into implementation status and the decisions behind the system.

Start here

Restspace v2 user manual

A practical guide for anyone comfortable with HTTP, JSON, and a little JavaScript. It runs from the mental model and first node through pipelines, custom services, security, deployment, and migration.

Read the manual →
All manual pages (81)
  1. Appendix A — Glossary
  2. Appendix B — Tenant config reference
  3. Appendix C — Error code reference
  4. Appendix D — Default limits and how to change them
  5. Appendix E — The rs2 CLI command reference
  6. Appendix F — Further reading
  7. Appendix G — How the JavaScript (V8 isolate) engine works
  8. Appendix H — How the WebAssembly (Wasmtime) engine works
  9. 1.1 What Restspace v2 is
  10. 1.2 The mental model: tenants, mounts, services, pipelines
  11. 1.3 What you can build with it (and what it deliberately leaves out)
  12. 1.4 How this manual is organized & prerequisites
  13. 2.1 Installing the runtime and the rs2 CLI
  14. 2.2 Running your first node (serverConfig.json)
  15. 2.3 Writing a minimal tenant config
  16. 2.4 Making your first request (and reading the response)
  17. 2.5 Health checks and the developer loop
  18. 3.1 Messages and bodies
  19. 3.2 Tenants and mounts (routing and path safety)
  20. 3.3 The store pattern: one client codepath for every store
  21. 3.4 Patterns vs. facets (feature-detection over special-casing)
  22. 3.5 Capabilities and the sandbox (default-deny)
  23. 3.6 The instruction plane: what fully describes a tenant
  24. 4.1 The file service: streamed reads and writes
  25. 4.2 Ranges, ETags, conditional GETs, and HEAD
  26. 4.3 Static-site & SPA hosting from a file mount
  27. 4.4 The data service: schema-validated JSON records
  28. 4.5 Schemas, validation errors, and JSON merge PATCH
  29. 4.6 Listings, pagination, and the ?confirm= delete guard
  30. 4.7 Choosing a storage backend and isolating mounts
  31. 5.0 The RS2 security model
  32. 5.1 The auth service: login, refresh, logout, current user
  33. 5.2 Users, password hashes, and roles
  34. 5.3 Tokens: JWTs, cookies, and bearer headers
  35. 5.4 Role specs on mounts (read/write/delete/invoke)
  36. 5.5 CORS, trusted vs. allowed origins, and the CSRF guard
  37. 6.1 The query service: stored queries authored like files
  38. 6.2 Parameters: URL segments, query strings, and request bodies
  39. 6.3 JSON templates (structural, injection-safe substitution)
  40. 6.4 String/SQL templates and bind parameters
  41. 6.5 Param schemas, defaults, and validation
  42. 6.6 Rendering HTML with the template service
  43. 7.1 The pipeline service: authored like files, run on any verb
  44. 7.2 The typed spec and the string DSL (two inputs, one stored form)
  45. 7.3 Step kinds: call, transform, pipeline, split
  46. 7.4 Modes: serial, parallel, conditional, tee/teeWait
  47. 7.5 Conditions, ${...} interpolation, and captured variables
  48. 7.6 Transforms with JSONata
  49. 7.7 Retries, effect classes, and idempotency
  50. 7.8 Segments and the ?$plan introspection
  51. 7.9 Debugging a pipeline
  52. 7.10 Wrappers and response shaping
  53. 7.11 Webhooks, schedules, and polling connectors
  54. 8.1 When to reach for custom code
  55. 8.2 The JavaScript service contract
  56. 8.3 The supported API surface (the npm-compat prelude)
  57. 8.4 The WebAssembly service contract
  58. 8.5 Capability grants: internal prefixes, outbound HTTP, and sockets
  59. 8.6 Building, bundling, and deploying (rs2 deploy)
  60. 8.7 Versioning, rollback, and mounting code: refs
  61. 8.8 Limits inside the sandbox and diagnosing failures
  62. 8.9 Loadable storage adapters (bring your own backend)
  63. 8.10 The proxy and sms services
  64. 8.11 Discovery manifests and external catalogues
  65. 9.1 The discovery surface (/.well-known/rs2/) and OpenAPI
  66. 9.2 Structured errors (application/problem+json)
  67. 9.3 Idempotency keys and replay
  68. 9.4 Caching: the universal caching config
  69. 9.5 Limits, containment, and the per-tenant circuit breaker
  70. 9.6 Tracing: X-Trace-Id and correlating to logs
  71. 10.1 Server config in depth
  72. 10.2 Single- vs. multi-tenant deployments
  73. 10.3 Logging & observability (the log service, sinks, severities)
  74. 10.4 Editing config safely (PUT /services/raw, dry-build, hot-swap)
  75. 10.5 Deploying and rotating custom code on a running node
  76. 10.6 Secrets handling (write-only config fields)
  77. 10.7 Infras, bootstrap, and production boundaries
  78. 11.1 What rs2 migrate carries over
  79. 11.2 What is warned, adjusted, or skipped
  80. 11.3 Post-migration checklist
  81. Restspace v2 — User Manual