Skip to main content
POST
/
v1
/
blueprints
/
create_from_inspection
JavaScript
import Runloop from '@runloop/api-client';

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

const blueprintView = await client.blueprints.createFromInspection({
  inspection_source: { inspection_id: 'inspection_id' },
  name: 'name',
});

console.log(blueprintView.id);
{
  "id": "<string>",
  "name": "<string>",
  "status": "provisioning",
  "state": "created",
  "create_time_ms": 123,
  "build_finish_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": {}
  },
  "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"
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

Name of the Blueprint.

inspection_source
object
required

(Optional) Use a RepositoryInspection a source of a Blueprint build. The Dockerfile will be automatically created based on the RepositoryInspection contents.

system_setup_commands
string[] | null

A list of commands to run to set up your system.

launch_parameters
object

Parameters to configure your Devbox at launch time.

file_mounts
object | null

(Optional) Map of paths and file contents to write before setup.

metadata
object | null

(Optional) User defined metadata for the Blueprint.

secrets
object | null

(Optional) Map of mount IDs/environment variable names to secret names. Secrets can be used as environment variables in system_setup_commands. Example: {"GITHUB_TOKEN": "gh_secret"} makes 'gh_secret' available as GITHUB_TOKEN.

Response

200 - application/json

OK

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.

id
string
required

The id of the Blueprint.

name
string
required

The name of the Blueprint.

status
enum<string>
required

The status of the Blueprint build.

Available options:
provisioning,
building,
failed,
build_complete
state
enum<string>
required

The state of the Blueprint.

Available options:
created,
deleted
create_time_ms
integer
required

Creation time of the Blueprint (Unix timestamp milliseconds).

parameters
object
required

The parameters used to create Blueprint.

build_finish_time_ms
integer | null

Build completion time of the Blueprint (Unix timestamp milliseconds).

failure_reason
enum<string>

The failure reason if the Blueprint build failed, if any.

Available options:
out_of_memory,
out_of_disk,
build_failed
base_blueprint_id
string | null

The ID of the base Blueprint.

containerized_services
object[] | null

List of ContainerizedServices available in the Blueprint. Services can be explicitly started when creating a Devbox.

is_public
boolean

Whether this Blueprint is publicly accessible to all users.

metadata
object | null

User defined metadata associated with the blueprint.

devbox_capabilities
enum<string>[] | null

Capabilities that will be available on Devbox.