Update a computer
curl --request PATCH \
--url https://api.runaether.dev/computers/{computerID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_starts": {
"state": "off"
},
"name": "<string>",
"remote_changes": {
"state": "off"
},
"set_up": false
}
'import requests
url = "https://api.runaether.dev/computers/{computerID}"
payload = {
"agent_starts": { "state": "off" },
"name": "<string>",
"remote_changes": { "state": "off" },
"set_up": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_starts: {state: 'off'},
name: '<string>',
remote_changes: {state: 'off'},
set_up: false
})
};
fetch('https://api.runaether.dev/computers/{computerID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/computers/{computerID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'agent_starts' => [
'state' => 'off'
],
'name' => '<string>',
'remote_changes' => [
'state' => 'off'
],
'set_up' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/computers/{computerID}"
payload := strings.NewReader("{\n \"agent_starts\": {\n \"state\": \"off\"\n },\n \"name\": \"<string>\",\n \"remote_changes\": {\n \"state\": \"off\"\n },\n \"set_up\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.runaether.dev/computers/{computerID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_starts\": {\n \"state\": \"off\"\n },\n \"name\": \"<string>\",\n \"remote_changes\": {\n \"state\": \"off\"\n },\n \"set_up\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/computers/{computerID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_starts\": {\n \"state\": \"off\"\n },\n \"name\": \"<string>\",\n \"remote_changes\": {\n \"state\": \"off\"\n },\n \"set_up\": false\n}"
response = http.request(request)
puts response.read_body{
"agent_starts": {
"state": "off"
},
"agents": [
{
"agent_type": "<string>",
"label": "<string>",
"problem": {
"code": "<string>",
"message": "<string>"
},
"version": "<string>"
}
],
"bridge": {
"problem": {
"code": "computer_needs_setup",
"message": "<string>"
},
"version": "<string>"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_seen_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"reachable": true,
"registered_at": "2023-11-07T05:31:56Z",
"remote_changes": {
"state": "off"
},
"set_up_at": "2023-11-07T05:31:56Z"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Computers
Update a computer
Changes one of the caller's computers: renames it, the name Aether shows it by wherever its work trees are listed, turns off its "let Aether start agents here" switch, so Aether starts no agent there, turns off its "changes from other devices" switch, so no other device opens a terminal or changes a file there, or resets it. What the body leaves out keeps.
Use this tool when you need to:
- Give a computer a name other than its host's, or tell two computers with one host name apart
- Stop Aether from starting agents on a computer, from the web app or the phone
- Stop other devices from opening a terminal or changing files on a computer, from the web app or the phone
- Cut off a copy of the computer's secret, from a backup or a copied folder, from the web app or the phone
Examples:
- PATCH /computers/{computerID} {"name": "Studio desktop"}
- PATCH /computers/{computerID} {"agent_starts": {"state": "off"}}
- PATCH /computers/{computerID} {"remote_changes": {"state": "off"}}
- PATCH /computers/{computerID} {"set_up": false}
Hints:
- The body holds name, agent_starts, remote_changes, set_up, or more than one, and at least one.
- set_up takes false alone, which resets the computer: in one transaction its secret is cleared, both switches turned off and its connection ended. It is unreachable at once: a poll its machine bridge holds answers 409 computer_connection_ended, and what is sent to it is not handed to the bridge. The bridge is refused with 403 computer_needs_setup until aether setup runs on the computer, which sets a new secret. set_up_at reads null until then. A reset ends no sign-in: signing out everywhere ends those. A reset e-mails the person, whatever their notification settings say.
- A reset takes a web or phone sign-in: an API key is refused with 403 credential_kind_not_admitted, and nothing in the body is changed.
- name is 1 to 100 characters with no surrounding space, no control or format character and no "://"; another is refused with 422. Registering the computer again with aether setup names it after its host again.
- agent_starts is the switch as listComputers lists it. A session or an API key only turns it off, {"state": "off"}: {"state": "on", "limit": 1..16} is refused with 403 agent_starts_on_from_computer_only, and nothing in the body is changed. Only the computer itself turns it on: run `aether computer agents on` (with --limit N for the most agents at once, 1 by default) in a terminal there.
- remote_changes is the switch as listComputers lists it. A session or an API key only turns it off, {"state": "off"}: {"state": "on"} is refused with 403 remote_changes_on_from_computer_only, and nothing in the body is changed. Only the computer itself turns it on: run `aether computer remote-changes on` in a terminal there. Turning it off ends every open live connection to the computer, closed with 4403 access_ended, and the bridge kills their shells.
- Setting a switch to the state it has changes nothing.
- A computerID that is not one of the caller's computers is refused with 404 not_found.
- Answers the computer as listComputers lists it.
- The caller changes a computer with a session, or an API key for all but a reset; a grant is refused with 403 credential_kind_not_admitted.
PATCH
/
computers
/
{computerID}
Update a computer
curl --request PATCH \
--url https://api.runaether.dev/computers/{computerID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_starts": {
"state": "off"
},
"name": "<string>",
"remote_changes": {
"state": "off"
},
"set_up": false
}
'import requests
url = "https://api.runaether.dev/computers/{computerID}"
payload = {
"agent_starts": { "state": "off" },
"name": "<string>",
"remote_changes": { "state": "off" },
"set_up": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_starts: {state: 'off'},
name: '<string>',
remote_changes: {state: 'off'},
set_up: false
})
};
fetch('https://api.runaether.dev/computers/{computerID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/computers/{computerID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'agent_starts' => [
'state' => 'off'
],
'name' => '<string>',
'remote_changes' => [
'state' => 'off'
],
'set_up' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/computers/{computerID}"
payload := strings.NewReader("{\n \"agent_starts\": {\n \"state\": \"off\"\n },\n \"name\": \"<string>\",\n \"remote_changes\": {\n \"state\": \"off\"\n },\n \"set_up\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.runaether.dev/computers/{computerID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_starts\": {\n \"state\": \"off\"\n },\n \"name\": \"<string>\",\n \"remote_changes\": {\n \"state\": \"off\"\n },\n \"set_up\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/computers/{computerID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_starts\": {\n \"state\": \"off\"\n },\n \"name\": \"<string>\",\n \"remote_changes\": {\n \"state\": \"off\"\n },\n \"set_up\": false\n}"
response = http.request(request)
puts response.read_body{
"agent_starts": {
"state": "off"
},
"agents": [
{
"agent_type": "<string>",
"label": "<string>",
"problem": {
"code": "<string>",
"message": "<string>"
},
"version": "<string>"
}
],
"bridge": {
"problem": {
"code": "computer_needs_setup",
"message": "<string>"
},
"version": "<string>"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_seen_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"reachable": true,
"registered_at": "2023-11-07T05:31:56Z",
"remote_changes": {
"state": "off"
},
"set_up_at": "2023-11-07T05:31:56Z"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Path Parameters
Body
application/json
Response
OK