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
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
Read and ignored. The body must be JSON (or empty), but no capability is matched: the answer always carries the capabilities below.
Response
Errors
| Status | error | When |
|---|---|---|
| 500 | session not created | The 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}
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
The id that New session returned.
Response
Always null.
Errors
| Status | error | When |
|---|---|---|
| 404 | invalid session id | No session is open, or the id is not the current one (no session `...`). |
Every route under /session/{sessionId} checks the id first and answers
404 invalid session id for any other.