/api/list/:token
List the user’s currently running sessions
Method
GET/POST
Parameters
- sortBy — (string) member to sort by (it will also check members in “params”)
- sortReverse (bool) — reverse sort
- start (int) — starting object
- limit (int) — maximum number of objects to return
- filter (string) — filter objects based on parameter (either in the top level or in params)
- The filter format is as follows
- When called using GET: &filter=name%3D%3Dvalue1,value2,value3
- When called using POST: filter:’name==value1,value2,valueN’
- name — parameter name
- %3D%3D — url encoded ‘==’
- value1,value2,valueN — comma separated list of values. The comma acts as an OR
- You can have multiple filter parameters. Multiple filters will act as an AND operation
Result
JSON array of session objects. Each object consists of the following parameters
- id — Xrdp session id
- serverPid — pid of the session
- geometry — width and height of the Xrdp session ( widthxheight )
- windowMode — window mode of the Xrdp session ( rootless or desktop )
- started — timestamp the session was started
- lastConnect — timestamp the session was last connected
- lastDisconnect — timestamp the session was last disconnected
- command — initial command execed when the session was started
- appPid — pid of the command
- clients — number of clients currently connected
- params — param object that is set using the params api call
- hostname — hostname of the machine the session is running on
- login — name of the user who started the session
- display — Display number of the session
- serverId — serverId of the FastX server running the session
- cpuPercentage — parameter when the session was started ( see session.json)
- videoRam — parameter when the session was started ( see session.json)
- sharing — parameter when the session was started ( see session.json)
- disconnectTImeout — parameter when the session was started ( see session.json)
Websocket Connetion
Connect to a /api/list?token=token
Server to Client Message
JSON object with the following format
- id — Xrdp session id
- data — JSON object of the session (see above)