Manage active sessions
Sessions can be inspected and controlled throughout their lifecycle. Drain for clean upgrades; terminate to end one now; revoke to cut off access immediately and block reattach. See Sessions & revocation.
List & inspect
Section titled “List & inspect”List active sessions and inspect one
- Open Operate → Active sessions.
- Filter by agent, environment, or state, and open a row for its lifecycle detail.
curl "$GATEWAY/v1/sessions?environment_id=prod&state=active" \
-H "authorization: Bearer $TOKEN"listActiveSessions in the API reference →gatewayctl list-sessions --environment prod --format jsonInspect one with gatewayctl inspect-session <client_session_id>.
Drain, terminate, or revoke
Section titled “Drain, terminate, or revoke”Drain, terminate, or revoke a session
- Open the session and choose Drain (finish in‑flight work), Terminate (end now), or Revoke (cut off + block reattach).
curl -X POST \
"$GATEWAY/v1/sessions/cs_123/revoke" \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
--data '{"reason_code": "compromised_agent"}'revokeSession in the API reference →gatewayctl revoke-session cs_123 --reason compromised_agentAlso: drain-session and terminate-session. Batch via POST /v1/sessions/batch-revoke.
Type set in Geist, Source Serif 4, and Departure Mono.