Page data

Change page data settings

Changed on

The body replaces the whole settings object (at most 16 KB), same shape as state on publish: an absent list is removed (its entries stay, it becomes private), an absent top-level key returns to its default, a named list keeps the rule keys the body omits. {} = on with defaults, null = off (entries stay).

patch/api/{ns}/{id}/state

Request

  • Base URL
    https://brewpage.app
  • Auth
    • API key in header X-Owner-Token
    • or API key in header X-Manage-Key

Path parameters

ns, string required
id, string required

Headers

X-Owner-Token, unknown

Owner token returned at creation

X-Manage-Key, unknown

Management key of this publication

Request body

StateSettingsRequest nullable required
collections, object nullable

Declared lists by name; lists absent here are removed (their entries stay); a list set to null takes the default rule

captcha, 'auto' | 'always' nullable

Human check for new visitors who save: auto (default) or always

maxDocBytes, integer nullable

Largest entry in bytes; absent or null = default

maxDocsPerVisitor, integer nullable

Entries one visitor may keep on this publication; absent or null = default

maxBytesPerVisitor, integer nullable

Bytes one visitor may keep on this publication; absent or null = default

accountOffer, boolean nullable

false: no offer to sign in to BrewPage on this page; absent or null = true

Response

Settings saved; same answer as the read

StateConfigResponse required
declared, boolean required

True when page data is turned on for this publication

config, StateSettings required

Settings in effect, every key spelled out (defaults when not turned on); a valid PATCH body as is

collections, StateCollectionUsage[] required

Every declared list and every other list holding entries or files, by name

usage, StateAmount required

Entries, files and their bytes stored on this publication

tier, 'anonymous' | 'account' required

Quota tier: account (publication of an active profile) or anonymous

caps, StateAmount required

Quota of this tier: at most this many entries, entry bytes, files and file bytes

alert, boolean required

True at 80% or more of the entry, entry size, file or file size quota

notices, PublishNotice[] required

Advisories about the request or the settings; empty when none

pageDataHint, 'form' | 'local' | 'game' | 'relay'

Page data would help this page or site: form (answers not saved), local (saves only in the visitor's browser), game (saved progress) or relay (sends input to an outside service); absent while page data is on or nothing suggests it

Changes

    • warning

      added the new relay enum value to the pageDataHint response property for the response status

    • warning

      added the new accounts enum value to the collections/items/write response property for the response status

    • warning

      added the new accounts enum value to the config/collections/additionalProperties/write response property for the response status

    4 more changes in this revision