Returns a list of all containers (including stopped and creating containers) for the authenticated user. The response includes real-time status synchronized with Docker, resource allocation, and usage statistics.
The List endpoint returns all containers for the authenticated user. Containers are sorted by creation date (newest first). For large datasets, consider implementing client-side filtering and pagination.
// Calculate total resource usageconst totalMemory = containers.reduce((sum, c) => sum + c.resources.memory_mb, 0);const totalCPU = containers.reduce((sum, c) => sum + c.resources.cpu_shares, 0);console.log(`Total: ${totalMemory}MB RAM, ${totalCPU/1000} CPU cores`);
If you have connected BYOS (Bring Your Own Server) agents, they appear in the containers list with an agent: prefix in the ID. Agents show status as online or offline.
Real-time Sync: Container statuses are synchronized with Docker on each request. For stopped containers, the database status is returned. This ensures accurate state information but may add slight latency to the response.
Monitoring: For real-time container updates (status changes, creation progress), connect to the WebSocket events endpoint instead of polling this endpoint.