Rendering
The render API resolves a published template and returns a fully merged page layout.
Render Flow
GET /api/v1/sdui/render?app=default&route=/home&platform=WEB
1. Resolve: find best matching template (app + route + platform + status + time)
2. Parse: deserialize sections JSON
3. Load: batch-fetch SectionDefs for all referenced types
4. Merge: definition defaults + instance overrides
5. Filter: remove disabled sections/blocks
6. Filter: evaluate visibility rules (website only)
7. Return: RenderResponse with RenderedSections
Response Structure
{
"templateId": "t1",
"route": "/home",
"platform": "ALL",
"sections": [
{
"id": "hero-1",
"type": "HeroSection",
"settings": {
"title": "Welcome to ELIVAAS",
"bgColor": "#FFFFFF",
"bgImage": "https://cdn.elivaas.com/hero.jpg"
},
"blocks": [
{
"id": "btn-1",
"type": "Button",
"settings": {
"label": "Explore Villas",
"variant": "primary"
}
}
]
}
]
}
Caching
Render results are cached at two levels:
| Level | Storage | TTL | Eviction |
|---|---|---|---|
| L1 | Caffeine (local) | 2 min | On publish/rollback |
| L2 | Redis OM | 10 min | On publish/rollback |
Cache key: {app}:{route}:{platform}
Two Render Endpoints
| Endpoint | Module | Context-Aware |
|---|---|---|
GET /api/v1/sdui/render (CRS) | CRS | No — returns all sections |
GET /api/v1/sdui/render (Website) | Website | Yes — evaluates visibility rules |