Build a blueprint
curl --request POST \
--url https://levers9.uselevers.com/blueprints/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pythonVersion": "<string>",
"pythonPackages": [
"<string>"
],
"commands": [
"<string>"
],
"existingImageUri": "<string>",
"existingImageCreds": {},
"buildSteps": [
{
"type": "<string>",
"command": "<string>"
}
],
"envVars": [
"<string>"
],
"dockerfile": "<string>",
"buildCtxObject": "<string>",
"secrets": [
"<string>"
],
"gpu": "<string>",
"ignorePython": true
}
'import requests
url = "https://levers9.uselevers.com/blueprints/build"
payload = {
"pythonVersion": "<string>",
"pythonPackages": ["<string>"],
"commands": ["<string>"],
"existingImageUri": "<string>",
"existingImageCreds": {},
"buildSteps": [
{
"type": "<string>",
"command": "<string>"
}
],
"envVars": ["<string>"],
"dockerfile": "<string>",
"buildCtxObject": "<string>",
"secrets": ["<string>"],
"gpu": "<string>",
"ignorePython": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pythonVersion: '<string>',
pythonPackages: ['<string>'],
commands: ['<string>'],
existingImageUri: '<string>',
existingImageCreds: {},
buildSteps: [{type: '<string>', command: '<string>'}],
envVars: ['<string>'],
dockerfile: '<string>',
buildCtxObject: '<string>',
secrets: ['<string>'],
gpu: '<string>',
ignorePython: true
})
};
fetch('https://levers9.uselevers.com/blueprints/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://levers9.uselevers.com/blueprints/build",
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([
'pythonVersion' => '<string>',
'pythonPackages' => [
'<string>'
],
'commands' => [
'<string>'
],
'existingImageUri' => '<string>',
'existingImageCreds' => [
],
'buildSteps' => [
[
'type' => '<string>',
'command' => '<string>'
]
],
'envVars' => [
'<string>'
],
'dockerfile' => '<string>',
'buildCtxObject' => '<string>',
'secrets' => [
'<string>'
],
'gpu' => '<string>',
'ignorePython' => true
]),
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://levers9.uselevers.com/blueprints/build"
payload := strings.NewReader("{\n \"pythonVersion\": \"<string>\",\n \"pythonPackages\": [\n \"<string>\"\n ],\n \"commands\": [\n \"<string>\"\n ],\n \"existingImageUri\": \"<string>\",\n \"existingImageCreds\": {},\n \"buildSteps\": [\n {\n \"type\": \"<string>\",\n \"command\": \"<string>\"\n }\n ],\n \"envVars\": [\n \"<string>\"\n ],\n \"dockerfile\": \"<string>\",\n \"buildCtxObject\": \"<string>\",\n \"secrets\": [\n \"<string>\"\n ],\n \"gpu\": \"<string>\",\n \"ignorePython\": true\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://levers9.uselevers.com/blueprints/build")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pythonVersion\": \"<string>\",\n \"pythonPackages\": [\n \"<string>\"\n ],\n \"commands\": [\n \"<string>\"\n ],\n \"existingImageUri\": \"<string>\",\n \"existingImageCreds\": {},\n \"buildSteps\": [\n {\n \"type\": \"<string>\",\n \"command\": \"<string>\"\n }\n ],\n \"envVars\": [\n \"<string>\"\n ],\n \"dockerfile\": \"<string>\",\n \"buildCtxObject\": \"<string>\",\n \"secrets\": [\n \"<string>\"\n ],\n \"gpu\": \"<string>\",\n \"ignorePython\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://levers9.uselevers.com/blueprints/build")
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 \"pythonVersion\": \"<string>\",\n \"pythonPackages\": [\n \"<string>\"\n ],\n \"commands\": [\n \"<string>\"\n ],\n \"existingImageUri\": \"<string>\",\n \"existingImageCreds\": {},\n \"buildSteps\": [\n {\n \"type\": \"<string>\",\n \"command\": \"<string>\"\n }\n ],\n \"envVars\": [\n \"<string>\"\n ],\n \"dockerfile\": \"<string>\",\n \"buildCtxObject\": \"<string>\",\n \"secrets\": [\n \"<string>\"\n ],\n \"gpu\": \"<string>\",\n \"ignorePython\": true\n}"
response = http.request(request)
puts response.read_body{
"result": {
"imageId": "<string>",
"msg": "<string>",
"done": true,
"success": true,
"pythonVersion": "<string>",
"warning": true
},
"error": {
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}BlueprintService
Build a blueprint
POST
/
blueprints
/
build
Build a blueprint
curl --request POST \
--url https://levers9.uselevers.com/blueprints/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pythonVersion": "<string>",
"pythonPackages": [
"<string>"
],
"commands": [
"<string>"
],
"existingImageUri": "<string>",
"existingImageCreds": {},
"buildSteps": [
{
"type": "<string>",
"command": "<string>"
}
],
"envVars": [
"<string>"
],
"dockerfile": "<string>",
"buildCtxObject": "<string>",
"secrets": [
"<string>"
],
"gpu": "<string>",
"ignorePython": true
}
'import requests
url = "https://levers9.uselevers.com/blueprints/build"
payload = {
"pythonVersion": "<string>",
"pythonPackages": ["<string>"],
"commands": ["<string>"],
"existingImageUri": "<string>",
"existingImageCreds": {},
"buildSteps": [
{
"type": "<string>",
"command": "<string>"
}
],
"envVars": ["<string>"],
"dockerfile": "<string>",
"buildCtxObject": "<string>",
"secrets": ["<string>"],
"gpu": "<string>",
"ignorePython": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pythonVersion: '<string>',
pythonPackages: ['<string>'],
commands: ['<string>'],
existingImageUri: '<string>',
existingImageCreds: {},
buildSteps: [{type: '<string>', command: '<string>'}],
envVars: ['<string>'],
dockerfile: '<string>',
buildCtxObject: '<string>',
secrets: ['<string>'],
gpu: '<string>',
ignorePython: true
})
};
fetch('https://levers9.uselevers.com/blueprints/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://levers9.uselevers.com/blueprints/build",
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([
'pythonVersion' => '<string>',
'pythonPackages' => [
'<string>'
],
'commands' => [
'<string>'
],
'existingImageUri' => '<string>',
'existingImageCreds' => [
],
'buildSteps' => [
[
'type' => '<string>',
'command' => '<string>'
]
],
'envVars' => [
'<string>'
],
'dockerfile' => '<string>',
'buildCtxObject' => '<string>',
'secrets' => [
'<string>'
],
'gpu' => '<string>',
'ignorePython' => true
]),
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://levers9.uselevers.com/blueprints/build"
payload := strings.NewReader("{\n \"pythonVersion\": \"<string>\",\n \"pythonPackages\": [\n \"<string>\"\n ],\n \"commands\": [\n \"<string>\"\n ],\n \"existingImageUri\": \"<string>\",\n \"existingImageCreds\": {},\n \"buildSteps\": [\n {\n \"type\": \"<string>\",\n \"command\": \"<string>\"\n }\n ],\n \"envVars\": [\n \"<string>\"\n ],\n \"dockerfile\": \"<string>\",\n \"buildCtxObject\": \"<string>\",\n \"secrets\": [\n \"<string>\"\n ],\n \"gpu\": \"<string>\",\n \"ignorePython\": true\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://levers9.uselevers.com/blueprints/build")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pythonVersion\": \"<string>\",\n \"pythonPackages\": [\n \"<string>\"\n ],\n \"commands\": [\n \"<string>\"\n ],\n \"existingImageUri\": \"<string>\",\n \"existingImageCreds\": {},\n \"buildSteps\": [\n {\n \"type\": \"<string>\",\n \"command\": \"<string>\"\n }\n ],\n \"envVars\": [\n \"<string>\"\n ],\n \"dockerfile\": \"<string>\",\n \"buildCtxObject\": \"<string>\",\n \"secrets\": [\n \"<string>\"\n ],\n \"gpu\": \"<string>\",\n \"ignorePython\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://levers9.uselevers.com/blueprints/build")
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 \"pythonVersion\": \"<string>\",\n \"pythonPackages\": [\n \"<string>\"\n ],\n \"commands\": [\n \"<string>\"\n ],\n \"existingImageUri\": \"<string>\",\n \"existingImageCreds\": {},\n \"buildSteps\": [\n {\n \"type\": \"<string>\",\n \"command\": \"<string>\"\n }\n ],\n \"envVars\": [\n \"<string>\"\n ],\n \"dockerfile\": \"<string>\",\n \"buildCtxObject\": \"<string>\",\n \"secrets\": [\n \"<string>\"\n ],\n \"gpu\": \"<string>\",\n \"ignorePython\": true\n}"
response = http.request(request)
puts response.read_body{
"result": {
"imageId": "<string>",
"msg": "<string>",
"done": true,
"success": true,
"pythonVersion": "<string>",
"warning": true
},
"error": {
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
URI for an existing image in the format
Show child attributes
Show child attributes
Show child attributes
Show child attributes

