Skip to main content

Sessions

GET /sessions

List terminal and RDP sessions.

  • Auth required: Yes
  • Permission: sessions.view_any to see all users' sessions; otherwise returns own sessions only

Query parameters

ParamTypeDescription
pagenumberPage number (default: 1)
limitnumberResults per page (default: 25)

Response

{
"sessions": [
{
"id": "sess_abc",
"userId": "user_xyz",
"protocol": "ssh",
"startedAt": "2024-01-01T00:00:00.000Z",
"endedAt": "2024-01-01T01:00:00.000Z",
"hasRecording": true,
"fileSize": 204800,
"connectionName": "Web Server",
"username": "alice"
}
],
"page": 1,
"limit": 25
}

DELETE /sessions

Purge all session history and recordings.

  • Auth required: Yes
  • Permission: sessions.delete

Response

{
"ok": true,
"deletedSessions": 42,
"deletedRecordings": 18,
"deletedFileSessions": 7
}

GET /sessions/:id/recording

Stream the session recording file. RDP sessions return a WebM video; SSH sessions return an asciinema CAST file.

  • Auth required: Yes
  • Range requests supported for WebM (allows seeking in browser players)

Response: Binary file stream.


GET /sessions/:id/commands

Get the command-level audit log for an SSH session.

  • Auth required: Yes

Response

{
"commands": [
{
"id": "cmd_abc",
"timestamp": "2024-01-01T00:05:00.000Z",
"elapsed": 300000,
"command": "ls -la /var/log",
"output_preview": "total 128\n..."
}
]
}

GET /sessions/:id/recording/events

Get RDP input events (clicks, keypresses, mouse movements) for a session.

  • Auth required: Yes

Response

{
"events": [
{ "elapsed": 1500, "event_type": "click" },
{ "elapsed": 3200, "event_type": "key" }
]
}

POST /sessions/rdp-session

Create an RDP session recording row at the start of a new RDP session.

  • Auth required: Yes

Request body

{ "connectionId": "conn_abc" }

Response

{ "sessionId": "sess_xyz", "shouldRecord": true }

POST /sessions/:id/recording/chunk

Append a WebM chunk to an in-progress RDP recording.

  • Auth required: Yes
  • Body: Raw binary WebM chunk

Response

{ "ok": true }

POST /sessions/:id/recording/finalize

Mark an RDP recording as complete.

  • Auth required: Yes

Response

{ "ok": true }

POST /sessions/:id/recording/events

Batch-insert RDP input events for a session.

  • Auth required: Yes

Request body

[
{ "elapsed": 1500, "type": "click" },
{ "elapsed": 3200, "type": "key" },
{ "elapsed": 4100, "type": "move" }
]

Response

{ "ok": true }

GET /sessions/storage

Get total disk space used by all recordings.

  • Auth required: Yes
  • Permission: settings.manage

Response

{ "bytes": 10737418240 }

GET /file-sessions

List file transfer sessions (SFTP, FTP, SMB).

  • Auth required: Yes
  • Permission: sessions.view_any to see all users' sessions; otherwise returns own only

Query parameters

ParamTypeDescription
pagenumberPage number (default: 1)
limitnumberResults per page (default: 25)

Response

{
"sessions": [
{
"id": "fsess_abc",
"userId": "user_xyz",
"protocol": "sftp",
"startedAt": "2024-01-01T00:00:00.000Z",
"endedAt": "2024-01-01T00:30:00.000Z",
"connectionName": "Files Server",
"username": "alice",
"eventCount": 14
}
],
"page": 1,
"limit": 25
}

GET /file-sessions/:id/events

Get all file events for a file transfer session.

  • Auth required: Yes

Response

{
"events": [
{
"id": "evt_abc",
"timestamp": "2024-01-01T00:05:00.000Z",
"action": "upload",
"path": "/var/www/html/index.html",
"detail": "12.4 KB"
}
]
}

GET /file-sessions/:id/export

Export file session events as JSON or CSV.

  • Auth required: Yes

Query parameters

ParamValuesDescription
formatjson, csvExport format

Response: File download.