banner

Set the site notice

Changed on

Only available to administrators.

Guarded by admin:access rather than a notice-specific permission, and that is deliberate. A new permission is created by the RBAC seed but not added to any existing role -- roles keep their configured permission sets unless the seed is run with reset, which would discard an instance's customisations. The endpoint would then be callable by nobody on precisely the instances that have been running longest, and would be found out during the incident someone was trying to announce.

put/banner

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/banner
  • Auth
    API key in header X-API-KEY

Headers

X-Fieldsstring mask

An optional fields mask

Request body

enabledboolean required

Whether a maintenance notice should be displayed.

messagestring

The notice to display (at most 2000 characters). Stored and returned verbatim; this instance's own pages render a small Markdown subset of it -- emphasis, code, lists and links -- and strip everything else.

Response

Success.

enabledboolean

Whether a maintenance notice should be displayed.

messagestring

The notice to display, as the administrator wrote it. May contain Markdown emphasis and links; it is never HTML.

Changes