Computers
CompozyOS Computers HTTP endpoints.
15 endpoints36 pages in API Reference
Endpoints15
- GET
/api/computersList computers added to this controller - POST
/api/computersAdd a linked account computer or start SSH setup - GET
/api/computers/availableList linked computers available to add - PATCH
/api/computers/localUpdate local execution and load balancing - POST
/api/computers/placementResolve Auto placement for a project - GET
/api/computers/setups/{setup_id}Read or wait for SSH setup progress - DELETE
/api/computers/setups/{setup_id}Cancel an unlinked SSH setup - POST
/api/computers/setups/{setup_id}/answerAnswer an SSH setup prompt - GET
/api/computers/ssh-hostsDiscover SSH hosts on the controller - GET
/api/computers/streamStream changes for the active account's computers - GET
/api/computers/{id}Inspect a computer and its routes - PATCH
/api/computers/{id}Update a computer in this controller
GET/api/computers
List computers added to this controller
httpuds
Responses
- 200
- Computer registry
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Computer registry
application/json- response
computers*array<>local*curl -X GET 'http://localhost:2123/api/computers'{ "computers": [ { "account_id": "string", "added_at": "2019-08-24T14:15:22Z", "diagnosis": { "at": "2019-08-24T14:15:22Z", "code": "string", "message": "string", "step": "string" }, "enabled": true, "id": "string", "last_connected_at": "2019-08-24T14:15:22Z", "load_balancing_weight": 0, "name": "string", "plan_state": "string", "platform": "string", "protocol": { "max": 0, "min": 0 }, "route_in_use": { "id": "string", "kind": "string", "label": "string" }, "routes": [ { "address": "string", "id": "string", "in_use": true, "kind": "string", "last_error": "string", "learned": true } ], "scopes": [ "string" ], "status": "string", "version": "string" } ], "local": { "load_balancing": true, "load_balancing_weight": 0, "run_agents": true }}POST/api/computers
Add a linked account computer or start SSH setup
httpuds
Request body
JSON request body
application/json- body
computer_id?stringhost?stringkind*stringname?stringport?integertrust_host_fingerprint?stringuser?stringResponses
- 201
- Computer added
- 202
- SSH setup started
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 422
- SSH setup input failed
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Computer added
application/json- response
account_id*stringadded_at*stringdate-timediagnosis*|enabled*booleanid*stringlast_connected_at*|date-timeload_balancing_weight*integername*stringplan_state*stringplatform*stringprotocol*|route_in_use*|routes*array<>scopes*array<string>status*stringversion*stringcurl -X POST 'http://localhost:2123/api/computers' \ -H 'Content-Type: application/json' \ -d '{ "kind": "string"}'{ "account_id": "string", "added_at": "2019-08-24T14:15:22Z", "diagnosis": { "at": "2019-08-24T14:15:22Z", "code": "string", "message": "string", "step": "string" }, "enabled": true, "id": "string", "last_connected_at": "2019-08-24T14:15:22Z", "load_balancing_weight": 0, "name": "string", "plan_state": "string", "platform": "string", "protocol": { "max": 0, "min": 0 }, "route_in_use": { "id": "string", "kind": "string", "label": "string" }, "routes": [ { "address": "string", "id": "string", "in_use": true, "kind": "string", "last_error": "string", "learned": true } ], "scopes": [ "string" ], "status": "string", "version": "string"}GET/api/computers/available
List linked computers available to add
httpuds
Responses
- 200
- Available account computers
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Available account computers
application/json- response
computers*array<>curl -X GET 'http://localhost:2123/api/computers/available'{ "computers": [ { "added": true, "id": "string", "name": "string", "online": true } ]}PATCH/api/computers/local
Update local execution and load balancing
httpuds
Request body
JSON request body
application/json- body
load_balancing?boolean|nullload_balancing_weight?integer|nullrun_agents?boolean|nullResponses
- 200
- Local computer settings
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Local computer settings
application/json- response
load_balancing*booleanload_balancing_weight*integerrun_agents*booleancurl -X PATCH 'http://localhost:2123/api/computers/local' \ -H 'Content-Type: application/json' \ -d '{}'{ "load_balancing": true, "load_balancing_weight": 0, "run_agents": true}POST/api/computers/placement
Resolve Auto placement for a project
httpuds
Request body
JSON request body
application/json- body
project_computer_id?stringworkspace*stringResponses
- 200
- Selected computer and workspace
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Selected computer and workspace
application/json- response
computer_id*stringname*stringworkspace_id*stringcurl -X POST 'http://localhost:2123/api/computers/placement' \ -H 'Content-Type: application/json' \ -d '{ "workspace": "string"}'{ "computer_id": "string", "name": "string", "workspace_id": "string"}GET/api/computers/setups/{setup_id}
Read or wait for SSH setup progress
httpuds
Path parameters
setup_id*stringSSH setup ID
Query parameters
wait_ms?integerWait for up to 30,000 ms
int32Responses
- 200
- Current SSH setup status
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Current SSH setup status
application/json- response
computer_id*string|nullerror*|prompt*|prompt_kind?stringsetup_id*stringstate*stringstep*stringcurl -X GET 'http://localhost:2123/api/computers/setups/string'{ "computer_id": "string", "error": { "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ] }, "prompt": { "fingerprint": "string", "host": "string", "kind": "string" }, "prompt_kind": "string", "setup_id": "string", "state": "string", "step": "string"}DELETE/api/computers/setups/{setup_id}
Cancel an unlinked SSH setup
httpuds
Path parameters
setup_id*stringSSH setup ID
Responses
- 200
- Setup stopped and slot released
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Setup stopped and slot released
application/json- response
setup_id*stringstate*stringcurl -X DELETE 'http://localhost:2123/api/computers/setups/string'{ "setup_id": "string", "state": "string"}POST/api/computers/setups/{setup_id}/answer
Answer an SSH setup prompt
httpuds
Path parameters
setup_id*stringSSH setup ID
Request body
JSON request body
application/json- body
accept?boolean|nullkind*stringvalue?stringResponses
- 204
- Answer accepted
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Answer accepted
curl -X POST 'http://localhost:2123/api/computers/setups/string/answer' \ -H 'Content-Type: application/json' \ -d '{ "kind": "string"}'{ "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ]}GET/api/computers/ssh-hosts
Discover SSH hosts on the controller
httpuds
Responses
- 200
- SSH hosts
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
SSH hosts
application/json- response
hosts*array<>curl -X GET 'http://localhost:2123/api/computers/ssh-hosts'{ "hosts": [ { "alias": "string", "hostname": "string", "port": 0, "source": "string", "user": "string" } ]}GET/api/computers/stream
Stream changes for the active account's computers
httpuds
Query parameters
after_sequence?stringResume from a computer event sequence
^(0|[1-9][0-9]{0,18}|1[0-7][0-9]{18}|18[0-3][0-9]{17}|184[0-3][0-9]{16}|1844[0-5][0-9]{15}|18446[0-6][0-9]{14}|184467[0-3][0-9]{13}|1844674[0-3][0-9]{12}|184467440[0-6][0-9]{10}|1844674407[0-2][0-9]{9}|18446744073[0-6][0-9]{8}|1844674407370[0-8][0-9]{6}|18446744073709[0-4][0-9]{5}|184467440737095[0-4][0-9]{4}|18446744073709550[0-9]{3}|18446744073709551[0-5][0-9]{2}|1844674407370955160[0-9]|1844674407370955161[0-5])$length <= 20Header parameters
Last-Event-ID?stringResume from the last computer event received
Responses
- 200
- Computer changes and resets
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Computer changes and resets
text/event-stream- response
data*event*stringid*stringcurl -X GET 'http://localhost:2123/api/computers/stream'{ "data": { "answered": true, "computer": { "account_id": "string", "added_at": "2019-08-24T14:15:22Z", "diagnosis": { "at": "2019-08-24T14:15:22Z", "code": "string", "message": "string", "step": "string" }, "enabled": true, "id": "string", "last_connected_at": "2019-08-24T14:15:22Z", "load_balancing_weight": 0, "name": "string", "plan_state": "string", "platform": "string", "protocol": { "max": 0, "min": 0 }, "route_in_use": { "id": "string", "kind": "string", "label": "string" }, "routes": [ { "address": "string", "id": "string", "in_use": true, "kind": "string", "last_error": "string", "learned": true } ], "scopes": [ "string" ], "status": "string", "version": "string" }, "computer_id": "string", "error": { "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ] }, "prompt": { "fingerprint": "string", "host": "string", "kind": "string" }, "removed": true, "setup_id": "string", "state": "string", "step": "string" }, "event": "string", "id": "string"}GET/api/computers/{id}
Inspect a computer and its routes
httpuds
Path parameters
id*stringComputer ID
Responses
- 200
- Computer status
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Computer status
application/json- response
account_id*stringadded_at*stringdate-timediagnosis*|enabled*booleanid*stringlast_connected_at*|date-timeload_balancing_weight*integername*stringplan_state*stringplatform*stringprotocol*|route_in_use*|routes*array<>scopes*array<string>status*stringversion*stringcurl -X GET 'http://localhost:2123/api/computers/string'{ "account_id": "string", "added_at": "2019-08-24T14:15:22Z", "diagnosis": { "at": "2019-08-24T14:15:22Z", "code": "string", "message": "string", "step": "string" }, "enabled": true, "id": "string", "last_connected_at": "2019-08-24T14:15:22Z", "load_balancing_weight": 0, "name": "string", "plan_state": "string", "platform": "string", "protocol": { "max": 0, "min": 0 }, "route_in_use": { "id": "string", "kind": "string", "label": "string" }, "routes": [ { "address": "string", "id": "string", "in_use": true, "kind": "string", "last_error": "string", "learned": true } ], "scopes": [ "string" ], "status": "string", "version": "string"}PATCH/api/computers/{id}
Update a computer in this controller
httpuds
Path parameters
id*stringComputer ID
Request body
JSON request body
application/json- body
enabled?boolean|nullload_balancing_weight?integer|nullname?string|nullResponses
- 200
- Updated computer
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Updated computer
application/json- response
account_id*stringadded_at*stringdate-timediagnosis*|enabled*booleanid*stringlast_connected_at*|date-timeload_balancing_weight*integername*stringplan_state*stringplatform*stringprotocol*|route_in_use*|routes*array<>scopes*array<string>status*stringversion*stringcurl -X PATCH 'http://localhost:2123/api/computers/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "account_id": "string", "added_at": "2019-08-24T14:15:22Z", "diagnosis": { "at": "2019-08-24T14:15:22Z", "code": "string", "message": "string", "step": "string" }, "enabled": true, "id": "string", "last_connected_at": "2019-08-24T14:15:22Z", "load_balancing_weight": 0, "name": "string", "plan_state": "string", "platform": "string", "protocol": { "max": 0, "min": 0 }, "route_in_use": { "id": "string", "kind": "string", "label": "string" }, "routes": [ { "address": "string", "id": "string", "in_use": true, "kind": "string", "last_error": "string", "learned": true } ], "scopes": [ "string" ], "status": "string", "version": "string"}DELETE/api/computers/{id}
Remove a computer from this controller
httpuds
Path parameters
id*stringComputer ID
Query parameters
unlink?booleanAlso unlink the computer from the account
uninstall?booleanAlso uninstall the managed SSH service
Responses
- 200
- Computer removed
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Computer removed
application/json- response
removed*booleanuninstall*stringcurl -X DELETE 'http://localhost:2123/api/computers/string'{ "removed": true, "uninstall": "string"}DELETE/api/computers/{id}/routes/{route_id}
Remove a learned route
httpuds
Path parameters
id*stringComputer ID
route_id*stringLearned route ID
Responses
- 204
- Route removed
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Route removed
curl -X DELETE 'http://localhost:2123/api/computers/string/routes/string'{ "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ]}POST/api/computers/{id}/update
Start an SSH computer update
httpuds
Path parameters
id*stringComputer ID
Responses
- 202
- Update setup started
- 400
- Bad Request
- 401
- Unauthorized
- 402
- Payment Required
- 403
- Forbidden
- 404
- Not Found
- 409
- Conflict
- 429
- Too Many Requests
- 503
- Service Unavailable
Response body
Update setup started
application/json- response
setup_id*stringcurl -X POST 'http://localhost:2123/api/computers/string/update'{ "setup_id": "string"}