Discovery Discovery protocol schemas
Service Status Enum
Describes the operational state of a service in the discovery response.
not been verified (may 501 at runtime).
unavailable – Service is not installed / not registered in the kernel.
degraded – Partially working (e.g., in-memory fallback, missing persistence).
stub – Placeholder handler that always returns 501 Not Implemented.
Source: packages/spec/src/api/discovery.zod.ts
import { ApiRoutes, Discovery, RouteHealthEntry, RouteHealthReport, ServiceInfo, ServiceSelfInfo, WellKnownCapabilities } from '@objectstack/spec/api' ;
import type { ApiRoutes, Discovery, RouteHealthEntry, RouteHealthReport, ServiceInfo, ServiceSelfInfo, WellKnownCapabilities } from '@objectstack/spec/api' ;
// Validate data
const result = ApiRoutes. parse (data);
Property Type Required Description data string✅ e.g. /api/v1/data metadata string✅ e.g. /api/v1/meta discovery stringoptional e.g. /api/v1/discovery ui stringoptional e.g. /api/v1/ui auth stringoptional e.g. /api/v1/auth automation stringoptional e.g. /api/v1/automation storage stringoptional e.g. /api/v1/storage analytics stringoptional e.g. /api/v1/analytics graphql stringoptional e.g. /graphql packages stringoptional e.g. /api/v1/packages workflow stringoptional e.g. /api/v1/workflow approvals stringoptional e.g. /api/v1/approvals realtime stringoptional e.g. /api/v1/realtime notifications stringoptional e.g. /api/v1/notifications ai stringoptional e.g. /api/v1/ai i18n stringoptional e.g. /api/v1/i18n feed stringoptional e.g. /api/v1/feed
Property Type Required Description name string✅ version string✅ environment Enum<'production' | 'sandbox' | 'development'>✅ routes Object✅ locale Object✅ services Record<string, Object>✅ Per-service availability map keyed by CoreServiceName capabilities Record<string, Object>optional Hierarchical capability descriptors for frontend intelligent adaptation schemaDiscovery Objectoptional Schema discovery endpoints for API toolchain integration metadata Record<string, any>optional Custom metadata key-value pairs for extensibility
Property Type Required Description route string✅ Route path pattern method Enum<'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS'>✅ HTTP method (GET, POST, etc.) service string✅ Target service name declared boolean✅ Whether the route is declared in discovery/metadata handlerRegistered boolean✅ Whether the HTTP handler is registered healthStatus Enum<'pass' | 'fail' | 'missing' | 'skip'>✅ pass = handler responds, fail = 501/503, missing = no handler (404), skip = not checked message stringoptional Diagnostic message
Property Type Required Description timestamp string✅ ISO 8601 timestamp of report generation adapter string✅ Adapter or runtime that produced this report totalDeclared integer✅ Total routes declared in discovery totalRegistered integer✅ Routes with confirmed handler totalMissing integer✅ Routes missing a handler routes Object[]✅ Per-route health entries
Property Type Required Description enabled boolean✅ status Enum<'available' | 'registered' | 'unavailable' | 'degraded' | 'stub'>✅ available = fully operational, registered = route declared but handler unverified, unavailable = not installed, degraded = partial, stub = placeholder that returns 501 handlerReady booleanoptional Whether the HTTP handler is confirmed to be mounted. Omitted = readiness unknown/unverified; true = handler mounted; false = handler missing or stub (likely 501). route stringoptional e.g. /api/v1/analytics provider stringoptional e.g. "objectql", "plugin-redis", "driver-memory" version stringoptional Semantic version of the service implementation (e.g. "3.0.6") message stringoptional e.g. "Install plugin-workflow to enable" rateLimit Objectoptional Rate limit and quota info for this service
Property Type Required Description status Enum<'stub' | 'degraded'>✅ stub = placeholder or dev fake (do not use for real work); degraded = functional fallback with reduced capability handlerReady booleanoptional Whether the HTTP handler genuinely serves requests. Defaults: false for stub, true for degraded. message stringoptional Human-readable explanation, e.g. what to install for the full implementation
Well-known capability flags for frontend intelligent adaptation
Property Type Required Description feed boolean✅ Whether the backend supports Feed / Chatter API comments boolean✅ Whether the backend supports comments (a subset of Feed) automation boolean✅ Whether the backend supports Automation CRUD (flows, triggers) cron boolean✅ Whether the backend supports cron scheduling search boolean✅ Whether the backend supports full-text search export boolean✅ Whether the backend supports async export chunkedUpload boolean✅ Whether the backend supports chunked (multipart) uploads