Remote API
Control a kiosk over the network: open pages, take screenshots, show messages, turn the screen off, change settings. Turn it on in Settings → Remote API. It’s off by default. For scripts in the kiosk’s own pages, see the Page API.
- Address:
http://<kiosk IP>:8081/api/v1/…(the port can be changed; Settings shows the address) - Every request needs the access token:
Authorization: Bearer <token>. Settings creates a random token when you turn the API on, and can show it or replace it. - Allowed addresses (optional): one IP address or CIDR range per line, e.g.
192.168.1.0/24,10.0.0.7,fd00::/8. Other callers get403. Empty = any device that can reach the kiosk. - Plain HTTP on the local network. Treat the token like a password; put the kiosk on a network you trust, or restrict the allowed addresses.
- Web pages can’t call the API (no CORS headers), even from the kiosk itself.
- Request bodies are JSON (
Content-Type: application/json), at most 1.2 MB (receipt HTML can carry inline images). An empty body is the same as{}.
Responses are JSON: { "ok": true, … }, or { "ok": false, "error": "<code>" } with an HTTP
error status. GET /screenshot returns a PNG.
Errors
| Status | error |
Meaning |
|---|---|---|
| 401 | unauthorized |
Missing or wrong token (checked before the path) |
| 403 | forbidden |
Caller’s IP isn’t in the allowed addresses (checked first) |
| 404 | not-found |
No such endpoint |
| 405 | method-not-allowed |
Wrong method for this endpoint |
| 413 | too-large |
Body over 1.2 MB |
| 400 | invalid-receipt (send exactly one of html / url), invalid-html, invalid-cut, invalid-drawer, invalid-json, invalid-url, invalid-clear, invalid-active, invalid-on, invalid-text, invalid-seconds, invalid-config, download-failed |
Bad request body |
| 409 | admin-open |
Someone has Settings (or the PIN pad) open on the kiosk; try again later |
| 402 | not-licensed |
The feature is set up but this device’s licence doesn’t include its package (Settings → Emda Pro) |
| 409 | printing-disabled |
POST /print while printing is off in Settings |
| 409 | receipt-disabled |
POST /receipt or /drawer while the receipt printer is off |
| 502 | printer-unreachable, printer-failed |
The receipt printer didn’t answer or refused the job |
| 500 | print-failed, clear-…-failed, internal |
The kiosk couldn’t do it |
| 503 | screenshot-unavailable |
The screen couldn’t be captured right now; try again |
Endpoints
| Method | Path | Body | Does |
|---|---|---|---|
| GET | /api/v1/ping |
{ "ok": true }; checks the token |
|
| GET | /api/v1/status |
Device and kiosk state (below) | |
| GET | /api/v1/screenshot |
PNG of what the screen shows | |
| GET | /api/v1/config |
{ "config": … } — current settings without the PIN hash, token, client certificate key and its password |
|
| POST | /api/v1/config |
{ "code": "emda:1:…" } or { "config": { … } } |
Replaces the settings like an import (setup code, settings JSON, or a web address of a settings file). The kiosk’s PIN, API token and client certificate are kept unless the new settings include them |
| POST | /api/v1/navigate |
{ "url": "https://…" } |
Opens a page (http/https). Admin authority: the allowed/blocked sites lists don’t apply |
| POST | /api/v1/home |
Home page | |
| POST | /api/v1/reload |
Reload | |
| POST | /api/v1/back |
Back | |
| POST | /api/v1/forward |
Forward | |
| POST | /api/v1/clear |
{ "history": true, "cache": true, "cookies": true } (at least one true) |
Clears browsing data |
| POST | /api/v1/screensaver |
{ "active": true } |
Shows the screensaver (until a touch or active: false) |
| POST | /api/v1/screen |
{ "on": false } |
Turns the screen off (black) until on: true; the admin gesture still opens Settings |
| POST | /api/v1/print |
{ "url": "https://…" } (optional) |
Prints the current page — or that page — with the printing settings, without a dialog |
| POST | /api/v1/message |
{ "text": "…", "seconds": 10 } |
Shows a message over the page (1–500 characters, 1–600 s, default 10) |
| POST | /api/v1/restart |
Restarts the app | |
| POST | /api/v1/receipt |
{ "html": "…" } or { "url": "https://…" }, plus optional cut, openDrawer |
Prints an HTML receipt, or a receipt page by address (cut / openDrawer override the settings) |
| POST | /api/v1/license |
{ "key": "EMDA1.…" }, or { "key": null } to remove it |
Installs or removes the licence key: { "license": { … } }; 400 invalid-license |
| POST | /api/v1/drawer |
Opens the cash drawer connected to the receipt printer | |
| GET | /api/v1/content |
{ "content": { "installed", "files", "bytes", "updatedAt", "source", "error" } } — the local content at emda://local/ |
|
| PUT | /api/v1/content |
the .zip itself as the request body (up to 1 GB) |
Replaces the local content. 422 with no-index, unsafe-path, invalid-zip, too-big or too-many-files keeps the old content |
| DELETE | /api/v1/content |
Removes the local content | |
| POST | /api/v1/content/update |
Downloads the .zip address from Settings now: { "updated": true/false }. 409 no-zip-url, 402 without Pro, 502 if the download fails |
OpenAPI
The whole API as OpenAPI 3.1: emda.io/openapi.json. Import it into Postman or Insomnia, or generate a typed client in your language (C#, Java, Python, TypeScript…) with OpenAPI Generator or NSwag.
GET /api/v1/status
{
"ok": true,
"deviceId": "a1b2c3d4-…", // Settings → Diagnostics shows the short form
"appVersion": "0.1.0",
"platform": "Windows 10.0.22631",
"internalIps": ["192.168.1.23"],
"mode": "kiosk", // kiosk | screensaver | off | shabbat | offline | pin | settings | setup
"screen": "on", // on | off | shabbat
"url": "https://clinic.example/checkin",
"title": "Check-in",
"locked": true,
"entitlement": "free",
"idleSeconds": 42,
"uptimeSeconds": 86400
}
Examples
TOKEN=…; KIOSK=http://192.168.1.23:8081/api/v1
curl -H "Authorization: Bearer $TOKEN" $KIOSK/status
curl -H "Authorization: Bearer $TOKEN" -d '{"url":"https://menu.example/he"}' $KIOSK/navigate
curl -H "Authorization: Bearer $TOKEN" -d '{"text":"Closing in 10 minutes","seconds":30}' $KIOSK/message
curl -H "Authorization: Bearer $TOKEN" -o screen.png $KIOSK/screenshot
curl -H "Authorization: Bearer $TOKEN" -d '{"on":false}' $KIOSK/screen
Local content
The kiosk can show your own site — an index.html with its CSS, scripts, images and videos — from
the private address emda://local/ (use it as the home page or in bookmarks), with no internet.
A .zip may hold the site at the top or inside one folder. Example upload:
curl -X PUT --data-binary @kiosk.zip -H "Authorization: Bearer $TOKEN" $KIOSK/content
On iPad
The iPad app answers the same requests with the same errors. Differences:
- Local network permission: iOS asks once whether Emda may use the local network. If it’s refused, other devices can’t reach the API; Settings → Remote API says so, and it’s turned back on in iOS Settings → Privacy & Security → Local Network → Emda.
POST /restartstarts the kiosk fresh (new browser, home page) instead of relaunching the app, which iOS doesn’t allow.POST /receipt//drawer: network receipt printers only (there’s no USB printing on iPad).POST /printgoes to the AirPrint printer chosen in Settings without a dialog; with no printer chosen it fails withprint-failed.POST /screen{"on":false}shows black and turns the brightness down;on: truerestores it.- The kiosk keeps the API running only while Emda is in the foreground (iOS suspends background apps); run it with Guided Access or Single App Mode.