DevTools API

The DevTools API provides programmatic access to the same real-time traffic data shown in the DevTools browser UI. Use it to build custom tooling, integrate with scripts, or pipe traffic data to other systems.

When to use the API vs the UI: The browser UI is great for interactive debugging. The API is better when you want to filter/process data programmatically, integrate with other tools, or capture output to a file.


Endpoint

When DevTools is enabled, Qtap exposes an SSE (Server-Sent Events) stream at:

http://localhost:10001/devtools/api/events

The stream delivers events in real-time as traffic flows through the system.


Quick Start

# Stream all events
curl -sN http://localhost:10001/devtools/api/events

# Stream and filter for HTTP transactions only
curl -sN http://localhost:10001/devtools/api/events | grep "request.http_transaction"

# Pretty-print event data
curl -sN http://localhost:10001/devtools/api/events | \
  grep "^data:" | sed 's/^data: //' | jq .

Event Types

The API streams six event types:

Event
Description

system.connected

Initial connection to the event stream

process.started

New process detected on host

process.stopped

Process terminated

connection.opened

New network connection established

connection.updated

Connection metadata updated (protocol detected, TLS info)

connection.closed

Connection terminated

request.http_transaction

Complete HTTP request/response captured


Event Format

Events follow the SSE format with event: and data: lines:


Event Schemas

process.started / process.stopped

Process lifecycle events include container attribution when applicable.

Field
Description

binary

Executable name

path

Full path to binary

pid

Process ID

hostname

Container hostname or system hostname

user

User ID and name running the process

container

Container metadata (when running in Docker/K8s)

container.labels

Labels from Docker or Kubernetes

connection.opened / connection.updated / connection.closed

Connection events include source/destination info, protocol detection, and TLS details.

Field
Description

meta.connectionId

Unique connection identifier

meta.endpointId

Resolved hostname of destination

meta.tlsProbeTypesDetected

TLS libraries detected (openssl, gotls, nodetls, javassl)

meta.tlsProbeIntrospected

Whether TLS was successfully introspected

direction

Traffic direction (egress-external, egress-internal, ingress)

l7Protocol

Detected application protocol (http1, http2, other)

tlsVersion

TLS version (TLS 1.2, TLS 1.3)

source

Source process, container, and address info

destination

Destination address

tags

Metadata tags from container labels

request.http_transaction

HTTP transaction events contain the full request/response with headers and bodies.

The data field contains base64-encoded JSON with the full transaction:


Examples

Filter for errors only

Watch connections to a specific host

Decode HTTP transaction bodies

Export to file for later analysis


Comparison with Plugin Output

Aspect
DevTools API
Plugins (stdout/S3)

Delivery

Real-time SSE stream

Log output or S3 objects

Filtering

Client-side

Server-side via Rulekit

Persistence

Ephemeral

Configurable storage

Process visibility

All processes

Only HTTP traffic

Connection visibility

All connections

HTTP transactions only

Use case

Live debugging

Production capture

For production monitoring and compliance storage, use plugins with S3 storage. The DevTools API is optimized for real-time debugging sessions.


Security Considerations

  • DevTools listens only on localhost by default

  • Use SSH tunneling for remote access: ssh -L 10001:localhost:10001 user@server

  • Never expose port 10001 to the public internet

  • Consider network segmentation in production environments

Last updated