Specification

This specification is for developers implementing a remote server compatible with Webview Bundle clients.

Client flow

  1. Request GET /update with the supported protocol and runtime versions and an optional channel.
  2. On a 200 response, verify any requested signature against the response bytes before parsing JSON.
  3. Compare the document's bundle list with the source's active versions.
  4. Download the required bundles and verify the integrity hashes in the document.
  5. Stage the downloaded files, then install them when the app is ready.

An update document can describe multiple bundles. Installation returns a result for each bundle.

Update request

Clients must request GET /update relative to the configured base URL. The request headers are:

HeaderRequiredValue
wvb-update-protocol-versionYes1
wvb-runtime-versionYesA positive integer. The client runtime value is 1.
wvb-update-channelNoA channel name such as beta. Omit for the default channel.
if-none-matchNoThe ETag of a previously accepted update.
wvb-expect-signatureNoA structured dictionary with string members key_id and alg.

For example:

GET /update HTTP/1.1
Host: updates.example.com
Accept: application/json
wvb-update-protocol-version: 1
wvb-runtime-version: 1

Update response

The server selects an update for the requested runtime and channel. Status codes must have the following meanings:

StatusMeaningBody
200An update document is available.Update JSON
204No update is available.Empty
304The selected document matches If-None-Match.Empty
400An invalid protocol, runtime, or signature request, or a required signature is missing.Error JSON
404The requested download or path is missing.Provider-specific error or empty body
500Server error.Error JSON

A 200 response must include Content-Type: application/json. Include an ETag to support conditional requests. Remote.getUpdate() returns no document for either 204 or 304. The updater can reuse a previously accepted cached document on 304, but doesn't treat 204 as permission to use a cached update.

The response body is the update data without the provider's storage wrapper. A minimal example is:

{
  "id": "0199ba38-8ba0-7000-8000-000000000001",
  "createdAt": "2026-10-17T00:00:00Z",
  "runtimeVersion": 1,
  "bundles": [{ "name": "app", "version": "1.1.0" }]
}

The document fields are:

FieldTypeRequiredMeaning
idstringYesUnique update identifier. Providers generate a UUID.
createdAtstringYesCreation time in ISO 8601 format.
runtimeVersionnumberYesCompatible library runtime version.
bundlesarrayYesBundle versions selected for the deployment.
metadataobjectNoMetadata with string keys and values.

Each bundle entry contains the following fields:

FieldTypeRequiredMeaning
namestringYesBundle name.
versionstringYesVersion identifier. Clients compare equality, not semantic version order.
integritystringNoFile hash in the form sha256:BASE64_DIGEST.
downloadUrlstringNoCustom absolute download URL supported by the core client.
metadataRecord<string, string>NoMetadata with string keys and values.

Conditional requests and caching

The server MUST select the update for the runtime and channel before evaluating If-None-Match. Return 304 if the ETag matches.

Separate caches by runtime, channel, and signature request. Configure the CDN to forward these headers and avoid serving stale /update responses. Keep bundle version URLs immutable.

Signatures

When a client requires a signature, it sends a structured dictionary such as:

wvb-expect-signature: key_id="release", alg="ed25519"

The server selects the key ID and algorithm and returns the following header:

wvb-signature: key_id="release", alg="ed25519", sig="BASE64_SIGNATURE"

Replace BASE64_SIGNATURE with the Base64-encoded signature. Sign the exact UTF-8 bytes of the response body. Clients verify those bytes before parsing. Configure trusted public keys separately in the app.

The built-in providers support three policies:

  • optional (default): requires a matching signature when the client requests one.
  • strict: requires a matching signature for the update being served.
  • off: does not reject an update because a signature is missing.

A 204 response has no body and skips signature verification. When an update is available, select the signature before comparing ETags.

Bundle download

If downloadUrl is absent, the client uses GET /bundles/NAME/VERSION as the default download path. Replace NAME and VERSION with the identifiers from the update document.

The server must return the bundle bytes unchanged. Use Content-Type: application/webview-bundle and include Content-Length when the size is known. Return 404 if the bundle is missing.

For example:

GET /bundles/app/1.1.0 HTTP/1.1
Host: updates.example.com

Errors and validation

The shared server uses a JSON object with a message field for error responses:

{ "message": "Unsupported update protocol version: 2" }

On this page