List this box and its peers
GET
/boxes
const url = 'http://127.0.0.1:7700/api/boxes';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://127.0.0.1:7700/api/boxes \ --header 'Authorization: Bearer <token>'This box first, with self set and its url from BOX_URL, then each peer named in the BOX_PEERS environment variable, as given there.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The boxes.
Media typeapplication/json
Array<object>
object
id
required
string
name
required
string
url
Where its portal and API answer. Empty for this box when BOX_URL is unset.
string
stdb
The box’s SpacetimeDB database name.
string
self
Set on this box only.
boolean
Example
[ { "id": "gurt-3f9a1c", "name": "Home box", "url": "http://box.local:7700", "stdb": "box", "self": true }, { "id": "gurt-8d02e4", "name": "Cloud box", "url": "http://192.0.2.20:7700", "stdb": "box" }]GurtOS is open source under the Apache License 2.0.Source code on GitHub.