Reference · HTTP

HTTP API guide.

The conventions behind every route: how a request is authenticated, which checks run before the handler, the limits on each body and the shapes returned by the app, settings, capability and store endpoints.

16 min readUpdated 1 December 2026101 routes · 5 detailed examples

Base URL and versions

Routes are relative to the running instance. Development uses https://localhost:8443; production uses the device’s HTTPS hostname. There is no public shared shell API host; the public store API is a separate service at store.rumahl.com.

shell
# development
export RUMAHL=https://localhost:8443

# inspect the current shell session
curl --cookie session.txt "$RUMAHL/api/v1/shell/snapshot"

Response documents carry a version field where the shape is public: catalogVersion, launchVersion, importVersion, settingsVersion, networkVersion and capabilityVersion. Treat an unknown version as unsupported.

Session and origin checks

CheckRule
SessionA live __Host- session cookie, issued by a local password login
Lifetime12 hours; a new login issues a fresh cookie
OriginMutating /api/v1/ requests require the exact shell origin
HostForeign Host headers are rejected by the gateway
CSRFCross-site form posts and missing CSRF protection are rejected
CachePrivate responses are no-store and are not cached by the offline worker
App windowsNever receive the shell session token or a broad bearer credential

Request headers

request shape
GET /api/v1/shell/apps HTTP/1.1
Host: localhost:8443
Cookie: __Host-rumahl_session=…
Accept: application/json

POST /api/v1/shell/apps/com.example.notes/launch HTTP/1.1
Host: localhost:8443
Origin: https://localhost:8443
Cookie: __Host-rumahl_session=…
Content-Type: application/json

{"installationId":"0199…"}

Mutating routes expect Content-Type: application/json unless documented otherwise. The launch route returns 415 for a missing or wrong content type, 403 for a wrong origin and 400 for an unexpected body key.

Example: read the app catalog

shell
curl --cookie session.txt \
  "$RUMAHL/api/v1/shell/apps"
catalog response
{
  "catalogVersion": 1,
  "apps": [
    {
      "id": "com.example.notes",
      "installationId": "0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f",
      "title": "Notes",
      "version": "1.4.0",
      "launchable": true,
      "revoked": false,
      "capabilities": [
        "com.rumahl.os.info",
        "com.rumahl.os.theme",
        "com.rumahl.os.settings"
      ],
      "runtime": "web",
      "lifecycle": "on-demand",
      "connectors": []
    }
  ]
}

The catalog is filtered by the live account. Installation alone does not mean launchable: launchable also depends on published assets and the runtime. A revoked app stays visible but cannot launch or start. Native apps are headless, so their catalog entry is not launched through the frame route; use the runtime route to start and stop the sandbox.

Example: launch an app

shell
curl --cookie session.txt \
  -H "Origin: $RUMAHL" \
  -H "Content-Type: application/json" \
  -d '{"installationId":"0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f"}' \
  "$RUMAHL/api/v1/shell/apps/com.example.notes/launch"
launch response
{
  "launchVersion": 1,
  "id": "com.example.notes",
  "installationId": "0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f",
  "lease": "6f6a1c2d3e4f…",
  "frameUrl": "https://0199….apps.localhost/launch/…/index.html",
  "renewAfterSeconds": 30
}
FieldMeaning
leaseA narrow bearer capability bound to one session and installation
frameUrlThe sandboxed app URL; assets are served only under the lease
renewAfterSecondsRenew before 90 seconds elapse or the frame is removed

Renew by sending the same body with the existing lease. A missing or unauthorized app returns 404; unavailable storage or configuration returns 503. In safe mode the route returns 423 with {"launchError":"safe-mode"}.

Example: import a signed package

import request (shape)
{
  "importVersion": 1,
  "files": [
    { "path": "package.json", "content": "<base64>" },
    { "path": "package.sig.json", "content": "<base64>" },
    { "path": "frontend/index.html", "content": "<base64>" }
  ],
  "device": "0199…",
  "installOrigin": "store"
}
import response
{
  "importVersion": 1,
  "id": "com.example.notes",
  "installationId": "0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f",
  "title": "Notes",
  "version": "1.4.0"
}

The importer verifies the detached Ed25519 signature and every SHA-256 digest before publishing assets. A package that fails verification is rejected; a policy denial returns 403 {"error":"denied"}. The request body is capped at 32 MiB.

Example: read and write app settings

shell
curl --cookie session.txt \
  "$RUMAHL/api/v1/shell/apps/com.example.notes/settings?installationId=0199…"

curl --cookie session.txt -X PUT \
  -H "Origin: $RUMAHL" -H "Content-Type: application/json" \
  -d '{"values":{"server.url":"https://nas.local","server.token":"secret"}}' \
  "$RUMAHL/api/v1/shell/apps/com.example.notes/settings?installationId=0199…"
settings response
{
  "settingsVersion": 1,
  "id": "com.example.notes",
  "installationId": "0199…",
  "manifest": [
    {
      "key": "server.url",
      "title": "Server address",
      "description": null,
      "type": "text",
      "required": true,
      "options": []
    },
    {
      "key": "server.token",
      "title": "Access token",
      "description": null,
      "type": "secret",
      "required": true,
      "options": []
    }
  ],
  "values": { "server.url": "https://nas.local" },
  "secrets": ["server.token"],
  "extended": null
}

Secret plaintext is never returned. A write is validated against the manifest kind, a secret is sealed with the platform field cipher and a required value must be present after the write.

Example: invoke a capability

shell
curl --cookie session.txt -X POST \
  -H "Origin: $RUMAHL" -H "Content-Type: application/json" \
  -d '{"capability":"com.example.notes.search","resource":{"namespace":"com.example.notes","kind":"query","key":"monstera"}}' \
  "$RUMAHL/api/v1/shell/capabilities/invoke"
invoke response
{
  "capabilityVersion": 1,
  "outcome": "invoked",
  "result": [{ "id": "2", "title": "Water the monstera" }],
  "browser": {
    "appId": "com.example.notes",
    "installationId": "0199…"
  }
}

For a running web provider, browser tells the shell which frame receives the provider.invoke request. A denied call returns an outcome of denied; a missing permission or unknown capability is a denial, not an empty result.

Example: fetch a store index

shell
curl --cookie session.txt \
  "$RUMAHL/api/v1/shell/store/fetch?url=https%3A%2F%2Fstore.example%2Findex.json"
index response (shape)
{
  "storeVersion": 1,
  "name": "Example Store",
  "apps": [
    {
      "id": "com.example.notes",
      "title": "Notes",
      "version": "1.4.0",
      "packageUrl": "https://store.example/packages/notes.package.json"
    }
  ]
}
ConditionResult
HTTP URL, credentials or fragmentRejected
RedirectNot followed
Timeout15 seconds
Document too largeRejected above 32 MiB
Untrusted certificate428 with host and leaf SHA-256 fingerprint
Successful fetchThe source JSON, proxied through the authenticated bridge

Status codes and error handling

StatusMeaningAction
400Malformed body, query or content typeFix the request; do not retry unchanged
401No live sessionLog in again
403Wrong origin, CSRF, missing grant or policy denialDo not retry; show the consent or sign-in path
404Unknown or unauthorized app/resourceTreat as not found; do not infer existence
413Body above the route limitReduce the payload
415Unsupported content typeSend application/json
423Safe mode or locked stateOpen recovery; do not loop
428Certificate trust requiredShow the fingerprint and ask the user
500Unexpected server errorRetry once, then show diagnostics
503Storage or runtime unavailableRetry later; fail closed

Request limits

RouteBody limit
POST /api/v1/shell/apps/{id}/launch1 KiB
POST /api/v1/shell/capabilities/invoke4 KiB
POST /api/v1/shell/report4 KiB
DELETE /api/v1/shell/apps/{id}2 KiB
GET/PUT /api/v1/shell/apps/{id}/settings256 KiB
POST /api/v1/shell/apps/preview32 MiB
POST /api/v1/shell/apps/install32 MiB
POST /api/v1/shell/apps/import32 MiB
POST /api/v1/shell/reauthenticate2 KiB
PUT /api/v1/shell/network4 KiB
PUT /api/v1/shell/store/sources32 KiB
PUT /api/v1/shell/store/updates64 KiB
PUT /api/v1/shell/system-updates4 KiB
POST /api/v1/shell/system-updates/*2 KiB

Route catalog

Apps8 routes
GET/api/v1/shell/appsBounded, session-filtered app catalog
POST/api/v1/shell/apps/{id}/launchAuthorize launch and return a frame URL plus lease
GET/PUT/api/v1/shell/apps/{id}/settingsRead or write manifest settings
GET/api/v1/shell/apps/{id}/dataScoped app data
GET/POST/api/v1/shell/apps/{id}/runtimeRead runtime state or send an action
POST/api/v1/shell/apps/importImport a verified package
DELETE/api/v1/shell/apps/{id}Uninstall an app
POST/api/v1/shell/capabilities/invokeInvoke a declared capability

The catalog is session-filtered. Launch and renewal re-authorize the live account, installation and grants.

Consent and network5 routes
GET/PUT/api/v1/shell/apps/{id}/grantsRead or issue explicit consent
DELETE/api/v1/shell/apps/{id}/grants/{grant}Revoke one grant
GET/PUT/api/v1/shell/apps/{id}/files/contentRead or write consented app files
GET/PUT/DELETE/api/v1/shell/apps/{id}/network/consentList, approve or revoke an origin
POST/api/v1/shell/apps/{id}/network/requestBrokered HTTP(S) request

Installation grants nothing. Each request is checked against the live installation, account, session and explicit consent.

Store7 routes
GET/api/v1/shell/store/fetchFetch a store index or package document
GET/api/v1/shell/store/imageProxy and validate source artwork
POST/api/v1/shell/store/trustWrite the source certificate trust file
GET/PUT/api/v1/shell/store/sourcesRead or save the OS-owned source list
GET/PUT/api/v1/shell/store/updatesRead or save the app auto-update policy
GET/api/v1/shell/store/updates/stateLast check and pending app updates
POST/api/v1/shell/store/updates/checkRun an app update check

Sources are untrusted catalogue providers. The shell fetches through the authenticated bridge and verifies packages on import.

Install jobs6 routes
POST/api/v1/shell/apps/previewValidate a package without installing it
POST/api/v1/shell/apps/installStart an OS-owned install or update
GET/api/v1/shell/apps/installsList active jobs
GET/api/v1/shell/apps/install/{job}Job progress and consent preview
POST/api/v1/shell/apps/install/{job}/confirmConfirm a parked install
POST/api/v1/shell/apps/install/{job}/cancelCancel a queued or parked job

Install and preview jobs run in the platform. The shell starts a job, polls it and confirms once consent is known; a reload reconnects through /installs.

System updates4 routes
GET/PUT/api/v1/shell/system-updatesState, channel and auto-download policy
POST/api/v1/shell/system-updates/checkCheck releases now
POST/api/v1/shell/system-updates/downloadDownload the selected release
POST/api/v1/shell/system-updates/installApply a downloaded release

Fixed release repository, stable/beta channels and optional stable auto-download. Applying requires an administrator and the privileged updater.

Network1 routes
GET/PUT/api/v1/shell/networkObserved network or a new static configuration

The platform validates static IPv4, gateway and DNS and asks the root host-config broker to apply them.

Next