Docs
Public URLs ›

List host routes

GET/v1/host-routes

List host routes.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const routes = await agental.hostRoutes();
Answer200 OK
  1. {
  2. "routes": [{
  3. "id": string,
  4. "sandboxId": string,
  5. "port": integer,
  6. "title": string,
  7. "public": boolean,
  8. "hidden": boolean,
  9. … 5 more
  10. }],
  11. }

Host routes.

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 Host routes.

JSON1 field
routes
HostRoute[]11 fields
id
string
sandboxId
string
port
integer
title
string
public
boolean
True gives the port a public address, reported as url.
More False keeps it behind proxyPath and your token.
hidden
boolean
proxyPath
string
Path on this API that reaches the port.
More Needs your token.
registered
true
listening
boolean
proxy
availablenot_configured
available while the sandbox is running and its ports can be reached.
url
stringnull
Public address of the port: HTTP and WebSocket only, no token needed, and hard to guess.
More It answers while the sandbox is running. Null when the route is not public or public addresses are off.

Errors and other answers

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.