Skip to content
GurtOS

Choose a relay

PUT
/remote/relay
curl --request PUT \
--url http://127.0.0.1:7700/api/remote/relay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "url": "https://relay.example.com" }'

Owner only, and only while remote access is off. Points the box, its pushes and Quick Start at a relay you run (see Run your own relay). The address must be https://, a public host name (not an IP address), with no path, query or login, and it must resolve only to public addresses. It is saved in BOX_HOME/relay.json.

Media typeapplication/json
object
url
required

The relay’s address. null goes back to the default.

string | null

Example

{
"url": "https://relay.example.com"
}

The relay now in use.

Media typeapplication/json
object
url
required
string
default
required
string
custom
required
boolean

Example generated

{
"url": "example",
"default": "example",
"custom": true
}

A bad address, with the reason.

Media typeapplication/json
object
error
required

What went wrong

string

Example

{
"error": "url: the relay must be https"
}

The owner’s route, called by someone who is not the box’s own screen or a device paired as the owner.

Media typeapplication/json
object
error
required

What went wrong

string

Example

{
"error": "only this computer's own screen or the owner's paired device can do this"
}

Remote access is on. Turn it off first.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}