import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const blueprintView of client.blueprints.list()) {
console.log(blueprintView.id);
}{
"blueprints": [
{
"id": "<string>",
"name": "<string>",
"status": "queued",
"state": "created",
"create_time_ms": 123,
"parameters": {
"name": "<string>",
"dockerfile": "<string>",
"system_setup_commands": [
"<string>"
],
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"token": "<string>"
}
],
"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>"
]
},
"file_mounts": {},
"base_blueprint_id": "<string>",
"base_blueprint_name": "<string>",
"services": [
{
"name": "<string>",
"image": "<string>",
"credentials": {
"username": "<string>",
"password": "<string>"
},
"env": {},
"port_mappings": [
"<string>"
],
"options": "<string>"
}
],
"metadata": {},
"build_args": {},
"secrets": {},
"build_context": {
"object_id": "<string>",
"type": "object"
}
},
"build_finish_time_ms": 123,
"failure_reason": "out_of_memory",
"base_blueprint_id": "<string>",
"containerized_services": [
{
"name": "<string>",
"image": "<string>",
"credentials": {
"username": "<string>",
"password": "<string>"
},
"env": {},
"port_mappings": [
"<string>"
],
"options": "<string>"
}
],
"is_public": true,
"metadata": {},
"devbox_capabilities": [
"unknown"
]
}
],
"has_more": true,
"total_count": 123,
"remaining_count": 123
}List all Blueprints or filter by name.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const blueprintView of client.blueprints.list()) {
console.log(blueprintView.id);
}{
"blueprints": [
{
"id": "<string>",
"name": "<string>",
"status": "queued",
"state": "created",
"create_time_ms": 123,
"parameters": {
"name": "<string>",
"dockerfile": "<string>",
"system_setup_commands": [
"<string>"
],
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"token": "<string>"
}
],
"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>"
]
},
"file_mounts": {},
"base_blueprint_id": "<string>",
"base_blueprint_name": "<string>",
"services": [
{
"name": "<string>",
"image": "<string>",
"credentials": {
"username": "<string>",
"password": "<string>"
},
"env": {},
"port_mappings": [
"<string>"
],
"options": "<string>"
}
],
"metadata": {},
"build_args": {},
"secrets": {},
"build_context": {
"object_id": "<string>",
"type": "object"
}
},
"build_finish_time_ms": 123,
"failure_reason": "out_of_memory",
"base_blueprint_id": "<string>",
"containerized_services": [
{
"name": "<string>",
"image": "<string>",
"credentials": {
"username": "<string>",
"password": "<string>"
},
"env": {},
"port_mappings": [
"<string>"
],
"options": "<string>"
}
],
"is_public": true,
"metadata": {},
"devbox_capabilities": [
"unknown"
]
}
],
"has_more": true,
"total_count": 123,
"remaining_count": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Filter by name
The limit of items to return. Default is 20.
Load the next page of data starting after the item with the given ID.
OK
List of blueprints matching filter.
Show child attributes
The id of the Blueprint.
The name of the Blueprint.
The status of the Blueprint build.
queued, provisioning, building, failed, build_complete The state of the Blueprint.
created, deleted Creation time of the Blueprint (Unix timestamp milliseconds).
The parameters used to create Blueprint.
Show child attributes
Name of the Blueprint.
Dockerfile contents to be used to build the Blueprint.
A list of commands to run to set up your system.
A list of code mounts to be included in the Blueprint.
Show child attributes
The name of the repo to mount. By default, code will be mounted at /home/user/{repo_name}s.
The owner of the repo.
Installation command to install and setup repository.
The authentication token necessary to pull repo.
Parameters to configure your Devbox at launch time.
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.
Show child attributes
After idle_time_seconds, on_idle action will be taken.
Action to take after Devbox becomes idle.
shutdown, suspend 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 x86_64.
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.
(Optional) ID of previously built blueprint to use as a base blueprint for this build.
(Optional) Name of previously built blueprint to use as a base blueprint for this build. When set, this will load the latest successfully built Blueprint with the given name. Only one of (base_blueprint_id, base_blueprint_name) should be specified.
(Optional) List of containerized services to include in the Blueprint. These services will be pre-pulled during the build phase for optimized startup performance.
Show child attributes
The name of the container service.
The image of the container service.
The port mappings of the container service. Port mappings are in the format of <host_port>:<container_port>.
Additional Docker container create options.
(Optional) Map of mount IDs/environment variable names to secret names. Secrets will be available to commands during the build. Secrets are NOT stored in the blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the secret 'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
Show child attributes
(Optional) Build context to be attached to the Blueprint build. This context is the source of COPY and ADD directives.
Build completion time of the Blueprint (Unix timestamp milliseconds).
The failure reason if the Blueprint build failed, if any.
out_of_memory, out_of_disk, build_failed The ID of the base Blueprint.
List of ContainerizedServices available in the Blueprint. Services can be explicitly started when creating a Devbox.
Show child attributes
The name of the container service.
The image of the container service.
The port mappings of the container service. Port mappings are in the format of <host_port>:<container_port>.
Additional Docker container create options.
Whether this Blueprint is publicly accessible to all users.
Capabilities that will be available on Devbox.
unknown, computer_usage, browser_usage, docker_in_docker Was this page helpful?