BrewPage · JSON Structure

Brewpage Html Page Structure

Logical structure for a BrewPage hosted HTML/Markdown page and how each field is sourced.

Type: Properties: 0
HostingMarkdownHTMLAI ArtifactsFile HostingDeveloper Tools

BrewPage HTML Page Structure is a JSON Structure definition published by BrewPage.

Meta-schema:

JSON Structure

Raw ↑
{
  "name": "BrewPage HTML Page Structure",
  "description": "Logical structure for a BrewPage hosted HTML/Markdown page and how each field is sourced.",
  "entity": "HTMLPage",
  "fields": [
    {"name": "id", "type": "string", "required": true, "source": "Server-issued 10-char identifier on POST /api/html"},
    {"name": "namespace", "type": "string", "required": true, "source": "Query param `ns` (defaults to `public`)"},
    {"name": "link", "type": "uri", "required": true, "source": "Composed by server: https://brewpage.app/{ns}/{id}"},
    {"name": "ownerLink", "type": "uri", "source": "Owner-only API URL returned at creation"},
    {"name": "ownerToken", "type": "string", "required": true, "source": "Issued at creation; required for PUT/DELETE via X-Owner-Token"},
    {"name": "filename", "type": "string", "source": "Body field at creation; immutable on update"},
    {"name": "format", "type": "enum", "values": ["html", "markdown", "md"], "source": "Query param `format` (defaults to html)"},
    {"name": "tags", "type": "array<string>", "source": "Query param `tags` (CSV); immutable on update"},
    {"name": "ttlDays", "type": "integer", "source": "Query param `ttl` (1..30, default 15)"},
    {"name": "passwordProtected", "type": "boolean", "source": "Derived: true when X-Password set at creation"},
    {"name": "showTopBar", "type": "boolean", "source": "Body field; overrides global default; immutable on update"},
    {"name": "createdAt", "type": "datetime", "source": "Server timestamp on POST"},
    {"name": "expiresAt", "type": "datetime", "source": "createdAt + ttlDays"},
    {"name": "views", "type": "integer", "source": "Incremented on each GET /{ns}/{id}"}
  ],
  "relationships": [
    {"name": "shortLink", "type": "hasOne", "target": "ShortLink"},
    {"name": "previewImage", "type": "hasOne", "target": "PreviewImage", "source": "Generated by GET /preview/{ns}/{id}.png"},
    {"name": "reports", "type": "hasMany", "target": "AbuseReport"}
  ]
}