HTTP logs

The OpenAPI 3.1 document is generated beside this preview as openapi.json. Schemas document current behavior; they never validate runtime requests. The built-in server is loopback/host-guarded and has no authentication.

startLogSession

Start collecting logs

startLogSession description

Starts a log session for a device and telnet port, creating a persistent telnet connection and a circular buffer. Fails if a session is already active for the same device and port. Roku Cloud Emulator failures keep their mapped HTTP status; other failures return 400.

startLogSession contract

POST /api/logs/start

Responses: 200, 400, 404, 409, 429, 500, 502, 504; middleware can also return 403, 408 or 429.

startLogSession see also

startLogSession body.device

Device ID, name, IP, or rce:<name> (defaults to active device if omitted).

startLogSession body.host

Direct target host/IP (bypasses device store selection for target resolution).

startLogSession body.password

Device password override (applies to host mode and can override stored device password).

startLogSession body.port

Log port for Roku device (defaults to 8085).

startLogSession body.bufferSize

Maximum lines to keep in the circular buffer (defaults to 10000).

listLogSessions

List log sessions

listLogSessions description

Lists log sessions with per-port status, buffer usage and connection metrics. Stopping a session keeps its buffer in memory, so stopped sessions stay listed.

listLogSessions contract

GET /api/logs/list

Responses: 200, 500; middleware can also return 403, 408 or 429.

listLogSessions see also

stopLogSessions

Stop log sessions

stopLogSessions description

Stops log sessions. Stopping a session disconnects the stream but keeps the buffer in memory. With all, stops every port for the given device, or every session for every device when no device is given. Without all, stops the selected device's sessions: only the one on port when it is given, otherwise every port for that device. With all and no device, the response reports totalLines and bufferSize as zero, wrapped as false and timestamps as null. With all and a device, totalLines and bufferSize are summed across every session in the manager (not just that device), wrapped is true if any session buffer has wrapped, and timestamps are null. Without all, the stats describe the session on the given port, or port 8085 when port is omitted; missing-session stats are zero/false/null.

stopLogSessions contract

POST /api/logs/stop

Responses: 200, 400, 404; middleware can also return 403, 408 or 429.

stopLogSessions see also

stopLogSessions body.device

Device ID, name, IP, or rce:<name> (defaults to active device if omitted).

stopLogSessions body.host

Direct target host/IP (bypasses device store selection for target resolution).

stopLogSessions body.password

Device password override (applies to host mode and can override stored device password).

stopLogSessions body.port

Log port to stop; omitted stops every port for the device.

stopLogSessions body.all

Stop all sessions, or every port for the given device.

getLogs

Get last N log lines

getLogs description

Retrieves the last N log lines from a session's buffer, as plain lines and as entries with their ISO timestamps.

getLogs contract

GET /api/logs/get

Responses: 200, 404, 500; middleware can also return 403, 408 or 429.

getLogs see also

getLogs query.device

Device ID, name, IP, or rce:<name> (defaults to active device if omitted).

getLogs query.host

Direct target host/IP (bypasses device store selection for target resolution).

getLogs query.password

Device password override (applies to host mode and can override stored device password).

getLogs query.port

Log port for Roku device (defaults to 8085).

getLogs query.lines

Number of log lines to return (defaults to 50).

tailLogs

Stream logs in real time

tailLogs description

Streams a log session as server-sent events and requires Accept: text/event-stream. The stream starts with a status event, replays the buffer as log events, then sends new log, status and error events. Each log event carries the session-scoped sequence number as its event ID so clients can deduplicate replayed lines on reconnect. A session that has already stopped returns 410.

tailLogs contract

POST /api/logs/tail

Responses: 200 (text/event-stream), 400, 404, 410, 500; middleware can also return 403, 408 or 429.

tailLogs see also

tailLogs body.device

Device ID, name, IP, or rce:<name> (defaults to active device if omitted).

tailLogs body.host

Direct target host/IP (bypasses device store selection for target resolution).

tailLogs body.password

Device password override (applies to host mode and can override stored device password).

tailLogs body.port

Log port for Roku device (defaults to 8085).

searchLogs

Search buffered logs

searchLogs description

Searches a session's buffered logs with a JavaScript regular expression and returns the matching lines. Matching is case-insensitive unless caseSensitive is set. The scan gives up with HTTP 408 once it has run for more than 1000ms; the check runs between lines, so one slow match is not interrupted.

searchLogs contract

GET /api/logs/search

Responses: 200, 400, 404, 408, 500; middleware can also return 403, 408 or 429.

searchLogs see also

searchLogs query.filter

Regex filter to match log lines.

searchLogs query.device

Device ID, name, IP, or rce:<name> (defaults to active device if omitted).

searchLogs query.host

Direct target host/IP (bypasses device store selection for target resolution).

searchLogs query.password

Device password override (applies to host mode and can override stored device password).

searchLogs query.port

Log port for Roku device (defaults to 8085).

searchLogs query.lines

Maximum matches to return (defaults to 100).

searchLogs query.caseSensitive

Enable case-sensitive matching with true or 1; other values keep matching case-insensitive.


Did this page help you?