The Docker API executes Docker commands on a remote host over an existing SSH session. All container operations require a valid SSH session established viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Termix-SSH/Termix/llms.txt
Use this file to discover all available pages before exploring further.
POST /docker/ssh/connect. Sessions are idle-scoped and automatically cleaned up after 60 minutes of inactivity.
All endpoints require JWT authentication. Docker must be enabled for the target host (the enableDocker flag must be set in Host Settings).
Session management
Connect SSH session
POST /docker/ssh/connect
Establishes an SSH connection to a host for Docker operations. Supports password, SSH key, OPKSSH, and keyboard-interactive authentication.
A client-generated unique identifier for this session. Use UUIDs or similar.
ID of the target host in the Termix database. Credentials are resolved server-side.
Optional password override. Takes precedence over stored credentials.
Optional SSH private key override (PEM format).
Passphrase for the override private key.
Route the connection through a SOCKS5 proxy.
SOCKS5 proxy hostname or IP.
SOCKS5 proxy port. Defaults to 1080.
SOCKS5 proxy username.
SOCKS5 proxy password.
Ordered array of SOCKS5 proxy chain nodes for multi-hop proxying.
true when the connection is established immediately.Confirmation message.
Structured connection log entries showing DNS, TCP, handshake, and auth stages.
Present and
true when TOTP verification is needed. Follow up with POST /docker/ssh/connect-totp.Present and
true when Warpgate browser authentication is needed.Warpgate authentication URL, present when
requires_warpgate is true.Warpgate security key shown during authentication.
Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | Missing sessionId or hostId, or invalid SSH key format. |
| 401 | Authentication required, or session expired. |
| 403 | Docker is not enabled for this host, or access denied. |
| 404 | Host not found. |
| 500 | SSH connection failed. |
Example request
Example request
cURL
Verify TOTP
POST /docker/ssh/connect-totp
Completes a pending SSH connection by verifying a TOTP or keyboard-interactive code. Call this when POST /docker/ssh/connect returns requires_totp: true. The session must be verified within 3 minutes.
Session ID from the initial connect call.
One-time code from the authenticator app or the keyboard-interactive prompt.
Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | sessionId or totpCode missing. |
| 401 | Authentication required or TOTP code invalid. |
| 404 | TOTP session expired — reconnect. |
| 408 | TOTP session or verification timed out. |
Complete Warpgate authentication
POST /docker/ssh/connect-warpgate
Signals that the user has completed Warpgate browser authentication. Call this after the user visits the Warpgate URL. The Warpgate session expires after 5 minutes.
Session ID from the initial connect call.
Disconnect SSH session
POST /docker/ssh/disconnect
Terminates an SSH session and releases all associated resources.
Session ID to disconnect.
Check session status
GET /docker/ssh/status
Session ID to check.
Always
true.Whether the session is currently connected.
Keep session alive
POST /docker/ssh/keepalive
Resets the session idle timer. Call this periodically (e.g. every 30 seconds) to prevent automatic cleanup.
Session ID to keep alive.
Always
true when the session is alive.Session connection state.
Unix timestamp (milliseconds) of the updated last-active time.
Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | Session ID missing or session not connected. |
| 403 | Session belongs to a different user. |
Docker availability
Validate Docker
GET /docker/validate/:sessionId
Verifies that Docker is installed and the daemon is accessible on the remote host.
Active SSH session ID.
Whether Docker is usable.
Docker version string, present when
available is true.Human-readable error description when
available is false.Machine-readable error code. One of
NOT_INSTALLED, DAEMON_NOT_RUNNING, or PERMISSION_DENIED.Example request
Example request
cURL
Example response (200 — available)
Example response (200 — available)
Containers
List containers
GET /docker/containers/:sessionId
Lists containers on the remote host.
Active SSH session ID.
When
true, includes stopped containers. Set to false for running containers only.Short container ID.
Container name.
Image name and tag.
Human-readable status (e.g.
"Up 3 hours").Machine-readable state:
running, exited, paused, etc.Port mapping string.
Creation timestamp.
Example request
Example request
cURL
Get container details
GET /docker/containers/:sessionId/:containerId
Returns the full docker inspect output for a single container.
Session ID.
Container ID or name. Only alphanumeric characters, dots, hyphens, and underscores are allowed.
Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | Session not connected. |
| 404 | Container not found. |
| 500 | Command execution error. |
Start a container
POST /docker/containers/:sessionId/:containerId/start
Session ID.
Container ID or name.
Always
true on success."Container started successfully".Stop a container
POST /docker/containers/:sessionId/:containerId/stop
Session ID.
Container ID or name.
Restart a container
POST /docker/containers/:sessionId/:containerId/restart
Session ID.
Container ID or name.
Pause a container
POST /docker/containers/:sessionId/:containerId/pause
Session ID.
Container ID or name.
Unpause a container
POST /docker/containers/:sessionId/:containerId/unpause
Session ID.
Container ID or name.
Remove a container
DELETE /docker/containers/:sessionId/:containerId/remove
Session ID.
Container ID or name.
When
true, forces removal of a running container (docker rm -f).Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | Session not connected, or container is running and force is not set. |
| 404 | Container not found. |
| 500 | Command execution error. |
Example request
Example request
cURL
Get container logs
GET /docker/containers/:sessionId/:containerId/logs
Session ID.
Container ID or name.
Number of log lines to return from the end of the log.
Prefix each log line with its timestamp.
Show logs since this timestamp (RFC 3339 / ISO 8601 format).
Show logs before this timestamp.
Always
true on success.Combined stdout/stderr log output.
Example request
Example request
cURL
Get container stats
GET /docker/containers/:sessionId/:containerId/stats
Returns a single snapshot of resource usage for a container (non-streaming).
Session ID.
Container ID or name.
CPU usage percentage string (e.g.
"2.34%").Memory used (e.g.
"128MiB").Memory limit (e.g.
"2GiB").Memory usage percentage.
Network bytes received.
Network bytes sent.
Block I/O bytes read.
Block I/O bytes written.
Number of processes in the container.
Example request
Example request
cURL
Example response (200)
Example response (200)