HTTP perfetto

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.

enablePerfettoTracing

Enable Perfetto tracing

enablePerfettoTracing description

Enables Perfetto tracing for a sideloaded channel on the device. A successful enable is remembered for the device and channel, which lets start check that tracing was enabled before it records. Redeploy the app afterwards so the channel starts with tracing on.

enablePerfettoTracing contract

POST /api/perfetto/enable

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

enablePerfettoTracing see also

enablePerfettoTracing body.channelId

Perfetto channel id to enable (default: dev).

enablePerfettoTracing body.device

Target device id, name, or IP. Uses active device when omitted.

enablePerfettoTracing body.host

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

enablePerfettoTracing body.password

Accepted for parity with other routes; has no effect because Perfetto endpoints are unauthenticated.

startPerfettoTrace

Start a Perfetto trace

startPerfettoTrace description

Starts a Perfetto trace session on the target device. Only one active session per device is allowed. Start refuses to record until enable has succeeded for the device and channel unless skipEnableCheck is set. Without Accept: text/event-stream it returns the session ID and trace file path. With it, the response is a server-sent event stream that sends session-attach and stdout events, then a complete event when the session stops or an error event on failure (with the error code; the HTTP status stays 200). The 400/409/500 responses apply only without the event-stream Accept header; closing the stream stops the session.

startPerfettoTrace contract

POST /api/perfetto/start

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

startPerfettoTrace see also

startPerfettoTrace body.device

Target device id, name, or IP. Uses active device when omitted.

startPerfettoTrace body.host

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

startPerfettoTrace body.password

Accepted for parity with other routes; has no effect because Perfetto endpoints are unauthenticated.

startPerfettoTrace body.output

Output trace file path (must stay within project root when provided).

startPerfettoTrace body.channelId

Channel ID to record (default: dev).

startPerfettoTrace body.skipEnableCheck

Record even if 'perfetto enable' was never run. Use it when the remembered enable state is stale, for example after a device reboot or when tracing was enabled from a different machine.

stopPerfettoTrace

Stop a Perfetto trace

stopPerfettoTrace description

Stops a previously started Perfetto trace session and returns the trace file metadata. Stopping a session that stopped within the last 60 seconds returns its saved metadata.

stopPerfettoTrace contract

POST /api/perfetto/stop

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

stopPerfettoTrace see also

stopPerfettoTrace body.sessionId

Session id returned by start.


Did this page help you?