A Site Blueprint (SiteBlueprintV1) describes an entire OpenDash site structure in one validated JSON payload: site identity, folder theme activation and design token overrides, custom post types, field groups, taxonomies, entries (both classic fields and Studio blocks), navigation menus, and homepage assignment.
SiteBlueprintV1 Top-Level Schema
Every blueprint requires "blueprint_version": 1. All remaining sections are optional and validated upfront before any SQLite transaction begins.
| Section | Key Fields | Notes |
|---|---|---|
site | title, tagline, timezone | title must be 1..=120 chars; tagline <= 240 chars |
theme | activate, options, design_tokens_override | Use "folder:<slug>" for folder-based themes |
content_types[] | key, label, singular_label, public, has_archive, publication | Declares custom post types without touching Core post/page |
field_groups[] | key, title, description, fields[], location_rules | Uses Unified Field Schema V1 field specs |
taxonomies[] | key, label, hierarchical, public | Registers taxonomies prior to term insertion |
terms[] | taxonomy, slug, name, locale | Creates or updates taxonomy terms |
entries[] | content_type, slug, title, status, locale, fields, builder_blocks | Populates both custom field values and Studio block trees |
menus[] | key, title, slot, items[{label, url}] | Creates menus and optionally binds them to theme slots |
reading | home_page_slug | Assigns the front page after entries are created |
{
"blueprint_version": 1,
"site": {
"title": "Acme Developer Docs",
"tagline": "Single-binary product documentation",
"timezone": "UTC"
},
"theme": {
"activate": "folder:opendash-starter-theme",
"options": { "version_badge": "v1.0" }
},
"content_types": [
{ "key": "doc", "label": "Docs", "singular_label": "Doc", "public": true, "has_archive": true }
],
"entries": [
{
"content_type": "page",
"slug": "home",
"title": "Welcome to Acme",
"status": "published"
}
],
"reading": { "home_page_slug": "home" }
}
Apply Modes & Dry-Run Verification
Three flags govern execution across CLI, HTTP, and MCP:
upsert(default): Creates missing objects and updates matching keys/slugs idempotently across repeated deployments.create_only: Inserts only non-existent entities; colliding keys raise a409 Conflict(blueprint_conflict).dry_run=true: Runs full schema validation and conflict analysis and returns aBlueprintApplyReportwithout committing SQLite changes or bumpingSiteCacheEpoch.
Three Channels: CLI, HTTP & MCP
# Dry-run locally against OPENDASH_SITE_ROOT
opendash blueprint apply blueprint.json --dry-run --mode upsert
# Apply against a remote running instance with Bearer token
opendash blueprint apply blueprint.json \
--url https://cms.example.com \
--token "od_pat_..." \
--mode upsert \
--json
curl -X POST "https://cms.example.com/api/admin/blueprint/apply?dry_run=true&mode=upsert" \
-H "Cookie: opendash_session=..." \
-H "Origin: https://cms.example.com" \
-H "X-CSRF-Token: <csrf>" \
-H "Content-Type: application/json" \
-d @blueprint.json
{
"name": "blueprint_apply",
"arguments": {
"dry_run": true,
"mode": "upsert",
"blueprint": {
"blueprint_version": 1,
"site": { "title": "Staging Preview" }
}
}
}
Output Report & Validation Diagnostics
Successful execution returns BlueprintApplyReport (max request body 4 MiB on HTTP): { ok, dry_run, mode, counts: { content_types, field_groups, taxonomies, terms, entries, menus }, warnings }. Invalid payloads fail closed with HTTP 422 Unprocessable Entity and structured field_errors: [{ path, message }] before any write occurs.