import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: 'My Bearer Token',
});
const browserView = await client.devboxes.browsers.retrieve('id');
console.log(browserView.connection_url);{
"devbox": {
"id": "<string>",
"status": "provisioning",
"create_time_ms": 123,
"end_time_ms": 123,
"metadata": {},
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"keep_alive_time_seconds": 123,
"available_ports": [
123
],
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"architecture": "x86_64",
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
]
},
"capabilities": [
"unknown"
],
"state_transitions": [
{
"status": "provisioning",
"transition_time_ms": {}
}
],
"name": "<string>",
"initiator_type": "unknown",
"initiator_id": "<string>",
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"failure_reason": "out_of_memory",
"shutdown_reason": "api_shutdown"
},
"connection_url": "<string>",
"live_view_url": "<string>"
}import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: 'My Bearer Token',
});
const browserView = await client.devboxes.browsers.retrieve('id');
console.log(browserView.connection_url);{
"devbox": {
"id": "<string>",
"status": "provisioning",
"create_time_ms": 123,
"end_time_ms": 123,
"metadata": {},
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"keep_alive_time_seconds": 123,
"available_ports": [
123
],
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"architecture": "x86_64",
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
]
},
"capabilities": [
"unknown"
],
"state_transitions": [
{
"status": "provisioning",
"transition_time_ms": {}
}
],
"name": "<string>",
"initiator_type": "unknown",
"initiator_id": "<string>",
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"failure_reason": "out_of_memory",
"shutdown_reason": "api_shutdown"
},
"connection_url": "<string>",
"live_view_url": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Browser ID
OK
A Browser represents a managed implementation of a browser like Chromiumon top of Devboxes. It includes the tunnel to the live screen and the underlying DevboxView.
The underlying devbox the browser setup is running on.
Show child attributes
The ID of the Devbox.
The current status of the Devbox.
provisioning, initializing, running, suspending, suspended, resuming, failure, shutdown Creation time of the Devbox (Unix timestamp milliseconds).
The time the Devbox finished execution (Unix timestamp milliseconds). Present if the Devbox is in a terminal state.
The launch parameters used to create the Devbox.
Show child attributes
Set of commands to be run at launch time, before the entrypoint process is run.
Manual resource configuration for Devbox. If not set, defaults will be used.
X_SMALL, SMALL, MEDIUM, LARGE, X_LARGE, XX_LARGE, CUSTOM_SIZE Time in seconds after which Devbox will automatically shutdown. Default is 1 hour. Maximum is 48 hours (172800 seconds).
A list of ports to make available on the Devbox. Only ports made available will be surfaced to create tunnels via the 'createTunnel' API.
Configure Devbox lifecycle based on idle activity. If after_idle is set, Devbox will ignore keep_alive_time_seconds.
custom resource size, number of cpu cores, must be multiple of 2. Min is 1, max is 16.
custom memory size, number in GiB, must be a multiple of 2. Min is 2GiB, max is 64GiB.
custom disk size, number in GiB, must be a multiple of 2. Min is 2GiB, max is 64GiB.
The target architecture for the Devbox. If unset, defaults to arm64.
x86_64, arm64 Specify the user for execution on Devbox. If not set, default user will be used.
A list of ContainerizedService names to be started when a Devbox is created. A valid ContainerizedService must be specified in Blueprint to be started.
A list of capability groups this devbox has access to. This allows devboxes to be compatible with certain tools sets like computer usage APIs.
unknown, computer_usage, browser_usage, docker_in_docker A list of state transitions in order with durations
Show child attributes
The status of the Devbox.
provisioning: Runloop is allocating and booting the necessary infrastructure resources. initializing: Runloop defined boot scripts are running to enable the environment for interaction. running: The Devbox is ready for interaction. suspending: The Devbox disk is being snapshotted as part of suspension. suspended: The Devbox disk is saved and no more active compute is being used for the Devbox. resuming: The Devbox disk is being loaded as part of booting a suspended Devbox. failure: The Devbox failed as part of booting or running user requested actions. shutdown: The Devbox was successfully shutdown and no more active compute is being used.
provisioning, initializing, running, suspending, suspended, resuming, failure, shutdown The time the status change occurred
The name of the Devbox.
The type of initiator that created the Devbox.
unknown, api, scenario The ID of the initiator that created the Devbox.
The Blueprint ID used in creation of the Devbox, if the devbox was created from a Blueprint.
The Snapshot ID used in creation of the Devbox, if the devbox was created from a Snapshot.
The failure reason if the Devbox failed, if the Devbox has a 'failure' status.
out_of_memory, out_of_disk, execution_failed The shutdown reason if the Devbox shutdown, if the Devbox has a 'shutdown' status.
api_shutdown, keep_alive_timeout, entrypoint_exit, idle The url to enable remote connection from browser automation tools like playwright.
The url to view the browser window and enable user interactions via their own browser. You can control the interactivity of the browser by adding or removing 'view_only' query parameter. view_only=1 will allow interaction and view_only=0 will disable interaction.
Was this page helpful?