wispist.json reference

wispist.json is an optional file at the site archive root. It declares the collections exposed to browser code by that release.

The parser is strict:

  • The file must be UTF-8 JSON no larger than 64 KiB.
  • Duplicate object members and unknown fields are errors.
  • version must be 1.
  • collections is required and may contain at most 32 entries.
  • Collection limits may lower, but never raise, host defaults.
  • Missing wispist.json means zero declared collections.

An invalid declaration rejects the complete upload. It never falls back to a permissive policy.

Top-level object #

MemberTypeRequiredMeaning
versionintegeryesProtocol declaration version; exactly 1.
collectionsobjectyesCollection name to collection declaration.

Collection names #

Names match:

[a-z][a-z0-9_-]{0,47}

They are ASCII, case-sensitive, and compared byte-for-byte.

Collection declaration #

MemberTypeRequiredMeaning
accessstring or objectyesA built-in profile or all six operation policies.
limitsobjectnoLower document count and byte limits.

Shared profile #

{
  "access": "shared"
}

shared expands to anyone for list, read, create, update, delete, and subscribe. Every visitor can read and change the collection.

Expanded access #

{
  "access": {
    "list": "anyone",
    "read": "anyone",
    "create": "nobody",
    "update": "nobody",
    "delete": "nobody",
    "subscribe": "anyone"
  }
}

Every operation must appear exactly once:

OperationControls
listListing collection documents.
readReading one document and receiving its body in a subscription.
createGenerated-ID POST and selected-ID create.
updateReplacing an existing document.
deleteDeleting an existing document.
subscribeOpening a change stream for the collection.

Each value is one of:

ValueMeaning
anyonePermit every principal.
authenticatedRequire an authenticated principal asserted by the host.
nobodyDeny the operation.

Wispdeck initially supplies anonymous principals to ordinary hosted-site and preview JavaScript. Preview authorisation grants access to the preview, not authenticated Wispist authority.

read and list are intentionally independent, as are read and subscribe.

Collection limits #

{
  "limits": {
    "maxDocuments": 250,
    "maxDocumentBytes": 4096
  }
}
MemberTypeRangeDefault
maxDocumentsinteger1 to host maximum1,000
maxDocumentBytesinteger2 to host maximum32 KiB

These limits apply to that collection. The namespace also has a total live or draft byte limit.

See also #

Edit this page