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.
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.
# 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
| Check | Rule |
|---|---|
| Session | A live __Host- session cookie, issued by a local password login |
| Lifetime | 12 hours; a new login issues a fresh cookie |
| Origin | Mutating /api/v1/ requests require the exact shell origin |
| Host | Foreign Host headers are rejected by the gateway |
| CSRF | Cross-site form posts and missing CSRF protection are rejected |
| Cache | Private responses are no-store and are not cached by the offline worker |
| App windows | Never receive the shell session token or a broad bearer credential |
Request headers
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
curl --cookie session.txt \
"$RUMAHL/api/v1/shell/apps"
{
"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
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"
{
"launchVersion": 1,
"id": "com.example.notes",
"installationId": "0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f",
"lease": "6f6a1c2d3e4f…",
"frameUrl": "https://0199….apps.localhost/launch/…/index.html",
"renewAfterSeconds": 30
}
| Field | Meaning |
|---|---|
lease | A narrow bearer capability bound to one session and installation |
frameUrl | The sandboxed app URL; assets are served only under the lease |
renewAfterSeconds | Renew 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
{
"importVersion": 1,
"files": [
{ "path": "package.json", "content": "<base64>" },
{ "path": "package.sig.json", "content": "<base64>" },
{ "path": "frontend/index.html", "content": "<base64>" }
],
"device": "0199…",
"installOrigin": "store"
}
{
"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
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…"
{
"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
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"
{
"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
curl --cookie session.txt \
"$RUMAHL/api/v1/shell/store/fetch?url=https%3A%2F%2Fstore.example%2Findex.json"
{
"storeVersion": 1,
"name": "Example Store",
"apps": [
{
"id": "com.example.notes",
"title": "Notes",
"version": "1.4.0",
"packageUrl": "https://store.example/packages/notes.package.json"
}
]
}
| Condition | Result |
|---|---|
| HTTP URL, credentials or fragment | Rejected |
| Redirect | Not followed |
| Timeout | 15 seconds |
| Document too large | Rejected above 32 MiB |
| Untrusted certificate | 428 with host and leaf SHA-256 fingerprint |
| Successful fetch | The source JSON, proxied through the authenticated bridge |
Status codes and error handling
| Status | Meaning | Action |
|---|---|---|
400 | Malformed body, query or content type | Fix the request; do not retry unchanged |
401 | No live session | Log in again |
403 | Wrong origin, CSRF, missing grant or policy denial | Do not retry; show the consent or sign-in path |
404 | Unknown or unauthorized app/resource | Treat as not found; do not infer existence |
413 | Body above the route limit | Reduce the payload |
415 | Unsupported content type | Send application/json |
423 | Safe mode or locked state | Open recovery; do not loop |
428 | Certificate trust required | Show the fingerprint and ask the user |
500 | Unexpected server error | Retry once, then show diagnostics |
503 | Storage or runtime unavailable | Retry later; fail closed |
Request limits
| Route | Body limit |
|---|---|
POST /api/v1/shell/apps/{id}/launch | 1 KiB |
POST /api/v1/shell/capabilities/invoke | 4 KiB |
POST /api/v1/shell/report | 4 KiB |
DELETE /api/v1/shell/apps/{id} | 2 KiB |
GET/PUT /api/v1/shell/apps/{id}/settings | 256 KiB |
POST /api/v1/shell/apps/preview | 32 MiB |
POST /api/v1/shell/apps/install | 32 MiB |
POST /api/v1/shell/apps/import | 32 MiB |
POST /api/v1/shell/reauthenticate | 2 KiB |
PUT /api/v1/shell/network | 4 KiB |
PUT /api/v1/shell/store/sources | 32 KiB |
PUT /api/v1/shell/store/updates | 64 KiB |
PUT /api/v1/shell/system-updates | 4 KiB |
POST /api/v1/shell/system-updates/* | 2 KiB |
Route catalog
/api/v1/shell/appsBounded, session-filtered app catalog/api/v1/shell/apps/{id}/launchAuthorize launch and return a frame URL plus lease/api/v1/shell/apps/{id}/settingsRead or write manifest settings/api/v1/shell/apps/{id}/dataScoped app data/api/v1/shell/apps/{id}/runtimeRead runtime state or send an action/api/v1/shell/apps/importImport a verified package/api/v1/shell/apps/{id}Uninstall an app/api/v1/shell/capabilities/invokeInvoke a declared capabilityThe catalog is session-filtered. Launch and renewal re-authorize the live account, installation and grants.
/api/v1/shell/apps/{id}/grantsRead or issue explicit consent/api/v1/shell/apps/{id}/grants/{grant}Revoke one grant/api/v1/shell/apps/{id}/files/contentRead or write consented app files/api/v1/shell/apps/{id}/network/consentList, approve or revoke an origin/api/v1/shell/apps/{id}/network/requestBrokered HTTP(S) requestInstallation grants nothing. Each request is checked against the live installation, account, session and explicit consent.
/api/v1/shell/store/fetchFetch a store index or package document/api/v1/shell/store/imageProxy and validate source artwork/api/v1/shell/store/trustWrite the source certificate trust file/api/v1/shell/store/sourcesRead or save the OS-owned source list/api/v1/shell/store/updatesRead or save the app auto-update policy/api/v1/shell/store/updates/stateLast check and pending app updates/api/v1/shell/store/updates/checkRun an app update checkSources are untrusted catalogue providers. The shell fetches through the authenticated bridge and verifies packages on import.
/api/v1/shell/apps/previewValidate a package without installing it/api/v1/shell/apps/installStart an OS-owned install or update/api/v1/shell/apps/installsList active jobs/api/v1/shell/apps/install/{job}Job progress and consent preview/api/v1/shell/apps/install/{job}/confirmConfirm a parked install/api/v1/shell/apps/install/{job}/cancelCancel a queued or parked jobInstall 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.
/api/v1/shell/system-updatesState, channel and auto-download policy/api/v1/shell/system-updates/checkCheck releases now/api/v1/shell/system-updates/downloadDownload the selected release/api/v1/shell/system-updates/installApply a downloaded releaseFixed release repository, stable/beta channels and optional stable auto-download. Applying requires an administrator and the privileged updater.
/api/v1/shell/networkObserved network or a new static configurationThe platform validates static IPv4, gateway and DNS and asks the root host-config broker to apply them.
Next
- API reference — every route in the current release.
- Bridge SDK reference — the app-side contract.
- Permissions — grants, scopes and consent.
- Troubleshooting — status codes and diagnostics.
Was this page helpful?