Skip to content

Computers

CompozyOS Computers HTTP endpoints.

15 endpoints36 pages in API Reference

Endpoints15

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
Request
curl -X GET 'http://localhost:2123/api/computers'
200 Computer registry
{  "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
  1. body
computer_id?string
host?string
kind*string
name?string
port?integer
trust_host_fingerprint?string
user?string

Responses

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
Request
curl -X POST 'http://localhost:2123/api/computers' \  -H 'Content-Type: application/json' \  -d '{  "kind": "string"}'
201 Computer added
{  "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
Request
curl -X GET 'http://localhost:2123/api/computers/available'
200 Available account computers
{  "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
  1. body
load_balancing?boolean|null
load_balancing_weight?integer|null
run_agents?boolean|null

Responses

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
Request
curl -X PATCH 'http://localhost:2123/api/computers/local' \  -H 'Content-Type: application/json' \  -d '{}'
200 Local computer settings
{  "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
  1. body
project_computer_id?string
workspace*string

Responses

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
Request
curl -X POST 'http://localhost:2123/api/computers/placement' \  -H 'Content-Type: application/json' \  -d '{  "workspace": "string"}'
200 Selected computer and workspace
{  "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*string

SSH setup ID

Query parameters

wait_ms?integer

Wait for up to 30,000 ms

Formatint32

Responses

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
Request
curl -X GET 'http://localhost:2123/api/computers/setups/string'
200 Current SSH setup status
{  "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*string

SSH 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
Request
curl -X DELETE 'http://localhost:2123/api/computers/setups/string'
200 Setup stopped and slot released
{  "setup_id": "string",  "state": "string"}

POST/api/computers/setups/{setup_id}/answer

Answer an SSH setup prompt

httpuds

Path parameters

setup_id*string

SSH setup ID

Request body

JSON request body

application/json
  1. body
accept?boolean|null
kind*string
value?string

Responses

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
Request
curl -X POST 'http://localhost:2123/api/computers/setups/string/answer' \  -H 'Content-Type: application/json' \  -d '{  "kind": "string"}'
400 Bad Request
{  "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
Request
curl -X GET 'http://localhost:2123/api/computers/ssh-hosts'
200 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?string

Resume from a computer event sequence

Match^(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])$
Lengthlength <= 20

Header parameters

Last-Event-ID?string

Resume 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
Request
curl -X GET 'http://localhost:2123/api/computers/stream'
200 Computer changes and resets
{  "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*string

Computer 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
Request
curl -X GET 'http://localhost:2123/api/computers/string'
200 Computer status
{  "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*string

Computer ID

Request body

JSON request body

application/json
  1. body
enabled?boolean|null
load_balancing_weight?integer|null
name?string|null

Responses

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
Request
curl -X PATCH 'http://localhost:2123/api/computers/string' \  -H 'Content-Type: application/json' \  -d '{}'
200 Updated 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"}

DELETE/api/computers/{id}

Remove a computer from this controller

httpuds

Path parameters

id*string

Computer ID

Query parameters

uninstall?boolean

Also 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
Request
curl -X DELETE 'http://localhost:2123/api/computers/string'
200 Computer removed
{  "removed": true,  "uninstall": "string"}

DELETE/api/computers/{id}/routes/{route_id}

Remove a learned route

httpuds

Path parameters

id*string

Computer ID

route_id*string

Learned 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
Request
curl -X DELETE 'http://localhost:2123/api/computers/string/routes/string'
400 Bad Request
{  "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*string

Computer 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
Request
curl -X POST 'http://localhost:2123/api/computers/string/update'
202 Update setup started
{  "setup_id": "string"}