2.1.3.5 System API Routes
A focused guide to System API Routes, connecting core concepts with practical Docker and container operations.
System API routes are the set of HTTP endpoints, under the /system, /version, /info, and /events paths, that the Docker daemon exposes for reporting its own status, version, configuration, and a live stream of events occurring across containers, images, and other resources it manages.
Checking Daemon Version and Compatibility
A route reports the daemon's version, the API version it supports, and details about the underlying platform it is running on, which clients use to confirm compatibility before issuing further requests.
curl --unix-socket /var/run/docker.sock http://localhost/version
Retrieving Daemon-Wide Information
A separate, more detailed route reports overall daemon configuration: how many containers and images exist, what storage driver is in use, and what resources (CPU, memory) the host has available.
curl --unix-socket /var/run/docker.sock http://localhost/info
This is the data source behind docker info, useful as a first check when diagnosing whether the daemon itself is healthy and properly configured.
Streaming System Events
A streaming route reports events as they happen across the daemon — a container starting, an image being pulled, a network being created — without needing to poll repeatedly for changes.
curl --unix-socket /var/run/docker.sock http://localhost/events
This corresponds to docker events, which is useful for building monitoring or automation that needs to react to changes in container state as they occur, rather than checking periodically.
Checking Disk Usage
A route reports how much disk space images, containers, and volumes are consuming in total, which is the data behind docker system df.
curl --unix-socket /var/run/docker.sock http://localhost/system/df
Pruning Unused Resources
A route can remove unused containers, images, networks, and build cache in a single operation, freeing disk space consumed by resources no longer in active use.
curl --unix-socket /var/run/docker.sock -X POST http://localhost/system/prune
Why These Routes Matter
Monitoring tools and dashboards that need a holistic view of a Docker host's health and activity rely on these system-level routes, since they aggregate information that would otherwise require querying many individual container, image, and network endpoints separately.