import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const blueprintView = await client.blueprints.create({ name: 'name' });
console.log(blueprintView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
blueprint_view = client.blueprints.create(
name="name",
)
print(blueprint_view.id)curl --request POST \
--url https://api.runloop.ai/v1/blueprints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"dockerfile": "<string>",
"system_setup_commands": [
"<string>"
],
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"git_ref": "<string>",
"token": "<string>"
}
],
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"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"
},
"network_policy_id": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/blueprints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'dockerfile' => '<string>',
'system_setup_commands' => [
'<string>'
],
'code_mounts' => [
[
'repo_name' => '<string>',
'repo_owner' => '<string>',
'install_command' => '<string>',
'git_ref' => '<string>',
'token' => '<string>'
]
],
'launch_parameters' => [
'launch_commands' => [
'<string>'
],
'available_ports' => [
123
],
'keep_alive_time_seconds' => 123,
'after_idle' => [
'idle_time_seconds' => 123
],
'custom_cpu_cores' => 123,
'custom_gb_memory' => 123,
'custom_disk_size' => 123,
'user_parameters' => [
'username' => '<string>',
'uid' => 123
],
'required_services' => [
'<string>'
],
'network_policy_id' => '<string>',
'lifecycle' => [
'after_idle' => [
'idle_time_seconds' => 123
],
'resume_triggers' => [
'http' => true,
'axon_event' => true
],
'lifecycle_hooks' => [
'suspend_commands' => [
'<string>'
],
'suspend_deadline_ms' => 123
]
]
],
'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'
],
'network_policy_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runloop.ai/v1/blueprints"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"dockerfile\": \"<string>\",\n \"system_setup_commands\": [\n \"<string>\"\n ],\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"file_mounts\": {},\n \"base_blueprint_id\": \"<string>\",\n \"base_blueprint_name\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"credentials\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"env\": {},\n \"port_mappings\": [\n \"<string>\"\n ],\n \"options\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"build_args\": {},\n \"secrets\": {},\n \"build_context\": {\n \"object_id\": \"<string>\",\n \"type\": \"object\"\n },\n \"network_policy_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runloop.ai/v1/blueprints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"dockerfile\": \"<string>\",\n \"system_setup_commands\": [\n \"<string>\"\n ],\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"file_mounts\": {},\n \"base_blueprint_id\": \"<string>\",\n \"base_blueprint_name\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"credentials\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"env\": {},\n \"port_mappings\": [\n \"<string>\"\n ],\n \"options\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"build_args\": {},\n \"secrets\": {},\n \"build_context\": {\n \"object_id\": \"<string>\",\n \"type\": \"object\"\n },\n \"network_policy_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/blueprints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"dockerfile\": \"<string>\",\n \"system_setup_commands\": [\n \"<string>\"\n ],\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"file_mounts\": {},\n \"base_blueprint_id\": \"<string>\",\n \"base_blueprint_name\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"credentials\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"env\": {},\n \"port_mappings\": [\n \"<string>\"\n ],\n \"options\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"build_args\": {},\n \"secrets\": {},\n \"build_context\": {\n \"object_id\": \"<string>\",\n \"type\": \"object\"\n },\n \"network_policy_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"create_time_ms": 123,
"parameters": {
"name": "<string>",
"dockerfile": "<string>",
"system_setup_commands": [
"<string>"
],
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"git_ref": "<string>",
"token": "<string>"
}
],
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"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"
},
"network_policy_id": "<string>"
},
"build_finish_time_ms": 123,
"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": []
}Create and build a Blueprint.
Starts build of custom defined container Blueprint. The Blueprint will begin in the ‘provisioning’ step and transition to the ‘building’ step once it is selected off the build queue., Upon build complete it will transition to ‘building_complete’ if the build is successful.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const blueprintView = await client.blueprints.create({ name: 'name' });
console.log(blueprintView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
blueprint_view = client.blueprints.create(
name="name",
)
print(blueprint_view.id)curl --request POST \
--url https://api.runloop.ai/v1/blueprints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"dockerfile": "<string>",
"system_setup_commands": [
"<string>"
],
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"git_ref": "<string>",
"token": "<string>"
}
],
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"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"
},
"network_policy_id": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/blueprints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'dockerfile' => '<string>',
'system_setup_commands' => [
'<string>'
],
'code_mounts' => [
[
'repo_name' => '<string>',
'repo_owner' => '<string>',
'install_command' => '<string>',
'git_ref' => '<string>',
'token' => '<string>'
]
],
'launch_parameters' => [
'launch_commands' => [
'<string>'
],
'available_ports' => [
123
],
'keep_alive_time_seconds' => 123,
'after_idle' => [
'idle_time_seconds' => 123
],
'custom_cpu_cores' => 123,
'custom_gb_memory' => 123,
'custom_disk_size' => 123,
'user_parameters' => [
'username' => '<string>',
'uid' => 123
],
'required_services' => [
'<string>'
],
'network_policy_id' => '<string>',
'lifecycle' => [
'after_idle' => [
'idle_time_seconds' => 123
],
'resume_triggers' => [
'http' => true,
'axon_event' => true
],
'lifecycle_hooks' => [
'suspend_commands' => [
'<string>'
],
'suspend_deadline_ms' => 123
]
]
],
'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'
],
'network_policy_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runloop.ai/v1/blueprints"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"dockerfile\": \"<string>\",\n \"system_setup_commands\": [\n \"<string>\"\n ],\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"file_mounts\": {},\n \"base_blueprint_id\": \"<string>\",\n \"base_blueprint_name\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"credentials\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"env\": {},\n \"port_mappings\": [\n \"<string>\"\n ],\n \"options\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"build_args\": {},\n \"secrets\": {},\n \"build_context\": {\n \"object_id\": \"<string>\",\n \"type\": \"object\"\n },\n \"network_policy_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runloop.ai/v1/blueprints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"dockerfile\": \"<string>\",\n \"system_setup_commands\": [\n \"<string>\"\n ],\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"file_mounts\": {},\n \"base_blueprint_id\": \"<string>\",\n \"base_blueprint_name\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"credentials\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"env\": {},\n \"port_mappings\": [\n \"<string>\"\n ],\n \"options\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"build_args\": {},\n \"secrets\": {},\n \"build_context\": {\n \"object_id\": \"<string>\",\n \"type\": \"object\"\n },\n \"network_policy_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/blueprints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"dockerfile\": \"<string>\",\n \"system_setup_commands\": [\n \"<string>\"\n ],\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"file_mounts\": {},\n \"base_blueprint_id\": \"<string>\",\n \"base_blueprint_name\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"image\": \"<string>\",\n \"credentials\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"env\": {},\n \"port_mappings\": [\n \"<string>\"\n ],\n \"options\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"build_args\": {},\n \"secrets\": {},\n \"build_context\": {\n \"object_id\": \"<string>\",\n \"type\": \"object\"\n },\n \"network_policy_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"create_time_ms": 123,
"parameters": {
"name": "<string>",
"dockerfile": "<string>",
"system_setup_commands": [
"<string>"
],
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"git_ref": "<string>",
"token": "<string>"
}
],
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"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"
},
"network_policy_id": "<string>"
},
"build_finish_time_ms": 123,
"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": []
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
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
Show child attributes
Parameters to configure your Devbox at launch time.
Show child attributes
Show child attributes
(Optional) Map of paths and file contents to write before setup.
Show child attributes
Show child attributes
(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
Show child attributes
(Optional) User defined metadata for the Blueprint.
Show child attributes
Show child attributes
(Optional) Arbitrary Docker build args to pass during build.
Show child attributes
Show child attributes
(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
Show child attributes
(Optional) Build context to be attached to the Blueprint build. This context is the source of COPY and ADD directives.
Show child attributes
Show child attributes
(Optional) ID of the network policy to apply during blueprint build. This restricts network access during the build process. This does not affect devboxes created from this blueprint; if you want devboxes created from this blueprint to inherit the network policy, set the network_policy_id on the blueprint launch parameters.
Response
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.
The id of the Blueprint.
The name of the Blueprint.
The status of the Blueprint build.
queued, provisioning, building, awaiting_upload, 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
Show child attributes
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
Show child attributes
Whether this Blueprint is publicly accessible to all users.
User defined metadata associated with the blueprint.
Show child attributes
Show child attributes
Capabilities that will be available on Devbox.
unknown, docker_in_docker Was this page helpful?
