API Reference
Devbox
- The Devbox Object
- Devbox Lifecycle
- Devbox File Tools
- Devbox Shell Tools
- Devbox Network Tools
- Devbox Persistence Tools
- Devbox Observability Tools
- Devbox Add-ons
Blueprint
- The Blueprint Object
- Blueprint Lifecycle
- Blueprint Observability
Repository
- The Repository Object
- Repository Lifecycle
Code Scenario
- Code Scenario Lifecycle
- Scenarios Runs
- Custom Scenario Scorer
- Public Scenarios
Benchmark
- Benchmark Lifecycle
- Benchmark Runs
- Public Benchmarks
List Blueprints.
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
});
async function main() {
// Automatically fetches more pages as needed.
for await (const blueprintView of client.blueprints.list()) {
console.log(blueprintView.id);
}
}
main();
{
"blueprints": [
{
"id": "<string>",
"name": "<string>",
"status": "provisioning",
"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
},
"file_mounts": {}
},
"failure_reason": "out_of_memory"
}
],
"has_more": true,
"total_count": 123,
"remaining_count": 123
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
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.
Response
List of blueprints matching filter.
Blueprints are ways to create customized starting points for Devboxes. They allow you to define custom starting points for Devboxes such that environment set up can be cached to improve Devbox boot times.
The id of the Blueprint.
The name of the Blueprint.
The status of the Blueprint build.
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.
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.
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.
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.
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.
custom memory size, number in Gi, must be a multiple of 2.
The failure reason if the Blueprint build failed, if any.
out_of_memory
, out_of_disk
, build_failed
Was this page helpful?
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
async function main() {
// Automatically fetches more pages as needed.
for await (const blueprintView of client.blueprints.list()) {
console.log(blueprintView.id);
}
}
main();
{
"blueprints": [
{
"id": "<string>",
"name": "<string>",
"status": "provisioning",
"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
},
"file_mounts": {}
},
"failure_reason": "out_of_memory"
}
],
"has_more": true,
"total_count": 123,
"remaining_count": 123
}