Check whether a name is free
GET
/remote/name/{name}
const url = 'http://127.0.0.1:7700/api/remote/name/rosa';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/remote/name/rosa \ --header 'Authorization: Bearer <token>'Owner only. Asks the relay whether it would give this name. A name that breaks the rules is answered without asking.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
string
Example
rosaResponses
Section titled “Responses”Whether the name is available.
Media typeapplication/json
object
name
required
string
available
required
boolean
reason
Why not
string
Example
{ "name": "rosa", "available": true}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"}The relay cannot be reached.
Media typeapplication/json
object
error
required
What went wrong
string
Example generated
{ "error": "example"}