Skip to content
Dashboard

List computers

client.computers.list(ComputerListParams { type } query?, RequestOptionsoptions?): ComputerListResponse { id, auto_kill, created_at, 8 more }
GET/computers

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

ParametersExpand Collapse
query: ComputerListParams { type }
type?: "live" | "persistent"

Session type filter

One of the following:
"live"
"persistent"
ReturnsExpand Collapse
ComputerListResponse = Array<ComputerResponse { id, auto_kill, created_at, 8 more } >
id?: string
auto_kill?: boolean
created_at?: string
endpoints?: Record<string, string>
expires_at?: string
idle_expires_at?: string
inactivity_timeout_seconds?: number
kind?: string
last_activity_at?: string
max_lifetime_seconds?: number
status?: string

List computers

import Lightcone from '@tzafon/lightcone';

const client = new Lightcone({
  apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted
});

const computerResponses = await client.computers.list();

console.log(computerResponses);
[
  {
    "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"
  }
]