Skip to main content

The endpoint holds one session at a time. Paths follow http://127.0.0.1:4445/{token}; see the overview for the reply format and the errors.

New session#

POST /session

Verified on macOS

Starts a session once the app’s window has loaded its page. The plugin serves before the app has opened its window, so the command asks the page for its document.readyState every 50 ms until it is complete, for up to 60 seconds. Then it resets the page script: a session starts in the top page, with no dialog recorded, no dialog answer set and no key or button held from the last session. The timeouts go back to their defaults.

A new session replaces the current one: one session at a time, and the old id then answers 404 invalid session id.

Body

capabilitiesobject#

Read and ignored. The body must be JSON (or empty), but no capability is matched: the answer always carries the capabilities below.

Response

valueobjectrequired#

Errors

StatuserrorWhen
500session not createdThe window did not load its page in 60 seconds (the app's window did not load its page in time), or the page could not be reset (the page could not be reset: ...).

Delete session#

DELETE /session/{sessionId}

Verified on macOS

Ends the session: the endpoint forgets its id. The app and its window stay open, and the page is not reset until the next new session.

Path

sessionIdstringrequired#

The id that New session returned.

Response

valuenullrequired#

Always null.

Errors

StatuserrorWhen
404invalid session idNo session is open, or the id is not the current one (no session `...`).
Note

Every route under /session/{sessionId} checks the id first and answers 404 invalid session id for any other.