Skip to content
Dashboard

List computers

computers.list(ComputerListParams**kwargs) -> ComputerListResponse
GET/computers

List all active computers for the user's organization. Use type=persistent to list persistent sessions instead.

ParametersExpand Collapse
type: Optional[Literal["live", "persistent"]]

Session type filter

One of the following:
"live"
"persistent"
ReturnsExpand Collapse
id: Optional[str]
auto_kill: Optional[bool]
created_at: Optional[str]
endpoints: Optional[Dict[str, str]]
expires_at: Optional[str]
idle_expires_at: Optional[str]
inactivity_timeout_seconds: Optional[int]
kind: Optional[str]
last_activity_at: Optional[str]
max_lifetime_seconds: Optional[int]
status: Optional[str]

List computers

import os
from tzafon import Lightcone

client = Lightcone(
    api_key=os.environ.get("TZAFON_API_KEY"),  # This is the default and can be omitted
)
computer_responses = client.computers.list()
print(computer_responses)
[
  {
    "id": "id",
    "auto_kill": true,
    "created_at": "created_at",
    "endpoints": {
      "foo": "string"
    },
    "expires_at": "expires_at",
    "idle_expires_at": "idle_expires_at",
    "inactivity_timeout_seconds": 0,
    "kind": "kind",
    "last_activity_at": "last_activity_at",
    "max_lifetime_seconds": 0,
    "status": "status"
  }
]
Returns Examples
[
  {
    "id": "id",
    "auto_kill": true,
    "created_at": "created_at",
    "endpoints": {
      "foo": "string"
    },
    "expires_at": "expires_at",
    "idle_expires_at": "idle_expires_at",
    "inactivity_timeout_seconds": 0,
    "kind": "kind",
    "last_activity_at": "last_activity_at",
    "max_lifetime_seconds": 0,
    "status": "status"
  }
]