Skip to main content
POST
/
v1
/
devboxes
/
{id}
/
create_tunnel
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: 'My Bearer Token',
});

const devboxTunnelView = await client.devboxes.createTunnel('id', { port: 0 });

console.log(devboxTunnelView.devbox_id);
{
  "devbox_id": "<string>",
  "port": 123,
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The Devbox ID.

Body

application/json
port
integer
required

Devbox port that tunnel will expose.

Response

OK

devbox_id
string
required

ID of the Devbox the tunnel routes to.

port
integer
required

Port of the Devbox the tunnel routes to.

url
string
required

Public url used to access Devbox.