Skip to content

Computers

15 methods on the Computers resource.

15 methods · 0 available to app tokens40 pages in SDK Reference

import { Compozy } from "@compozy/client";

15 of 15

addAccountComputer

Add a linked account computer or start SSH setup

compozy.computers.addAccountComputer({ body }) → Promise<AddAccountComputerResponse>

Request bodyAddComputerRequest

POST /api/computersapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.addAccountComputer({ body: { /* request fields */ } });

answerComputerSetup

Answer an SSH setup prompt

compozy.computers.answerComputerSetup({ path, body }) → Promise<void>

Options

setup_idstringpathrequired
SSH setup ID

Request bodyComputerSetupAnswer

POST /api/computers/setups/{setup_id}/answerapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.answerComputerSetup({ path: { "setup_id": "setup_id" }, body: { /* request fields */ } });

cancelComputerSetup

Cancel an unlinked SSH setup

compozy.computers.cancelComputerSetup({ path }) → Promise<ComputerSetupCanceled>

Options

setup_idstringpathrequired
SSH setup ID

DELETE /api/computers/setups/{setup_id}app tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.cancelComputerSetup({ path: { "setup_id": "setup_id" } });

getComputer

Inspect a computer and its routes

compozy.computers.getComputer({ path }) → Promise<Computer>

Options

idstringpathrequired
Computer ID

GET /api/computers/{id}app tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.getComputer({ path: { "id": "id" } });

getComputerSetup

Read or wait for SSH setup progress

compozy.computers.getComputerSetup({ path, query }) → Promise<ComputerSetupStatus>

Options

setup_idstringpathrequired
SSH setup ID
wait_msintegerquery
Wait for up to 30,000 ms

GET /api/computers/setups/{setup_id}app tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.getComputerSetup({ path: { "setup_id": "setup_id" } });

listAvailableComputers

List linked computers available to add

compozy.computers.listAvailableComputers() → Promise<AvailableComputersResponse>

GET /api/computers/availableapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.listAvailableComputers();

listComputerSSHHosts

Discover SSH hosts on the controller

compozy.computers.listComputerSSHHosts() → Promise<ComputerSSHHostsResponse>

GET /api/computers/ssh-hostsapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.listComputerSSHHosts();

listComputers

List computers added to this controller

compozy.computers.listComputers() → Promise<ComputerListResponse>

GET /api/computersapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.listComputers();

patchComputer

Update a computer in this controller

compozy.computers.patchComputer({ path, body }) → Promise<Computer>

Options

idstringpathrequired
Computer ID

Request bodyPatchComputerRequest

PATCH /api/computers/{id}app tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.patchComputer({ path: { "id": "id" }, body: { /* request fields */ } });

patchLocalComputer

Update local execution and load balancing

compozy.computers.patchLocalComputer({ body }) → Promise<LocalComputer>

Request bodyPatchLocalComputerRequest

PATCH /api/computers/localapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.patchLocalComputer({ body: { /* request fields */ } });
Show all 15 methods

previewComputerPlacement

Resolve Auto placement for a project

compozy.computers.previewComputerPlacement({ body }) → Promise<ComputerPlacementResponse>

Request bodyComputerPlacementRequest

POST /api/computers/placementapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.previewComputerPlacement({ body: { /* request fields */ } });

removeComputer

Remove a computer from this controller

compozy.computers.removeComputer({ path, query }) → Promise<RemoveComputerResponse>

Options

idstringpathrequired
Computer ID
unlinkbooleanquery
Also unlink the computer from the account
uninstallbooleanquery
Also uninstall the managed SSH service

DELETE /api/computers/{id}app tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.removeComputer({ path: { "id": "id" } });

removeComputerRoute

Remove a learned route

compozy.computers.removeComputerRoute({ path }) → Promise<void>

Options

idstringpathrequired
Computer ID
route_idstringpathrequired
Learned route ID

DELETE /api/computers/{id}/routes/{route_id}app tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.removeComputerRoute({ path: { "id": "id", "route_id": "route_id" } });

startComputerUpdate

Start an SSH computer update

compozy.computers.startComputerUpdate({ path }) → Promise<ComputerUpdateStarted>

Options

idstringpathrequired
Computer ID

POST /api/computers/{id}/updateapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.computers.startComputerUpdate({ path: { "id": "id" } });

streamComputers

Stream changes for the active account's computers

compozy.events("streamComputers", { query }) → AsyncIterable<StreamEvent<SseFrame<"streamComputers">>>

Options

after_sequencestringquery
Resume from a computer event sequence

GET /api/computers/streamapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();for await (const frame of compozy.events("streamComputers", {})) {  console.log(frame);}