Get build status
curl --request GET \
--url https://api.e2b.app/templates/{templateID}/builds/{buildID}/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.e2b.app/templates/{templateID}/builds/{buildID}/status"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.e2b.app/templates/{templateID}/builds/{buildID}/status', 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://api.e2b.app/templates/{templateID}/builds/{buildID}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.e2b.app/templates/{templateID}/builds/{buildID}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.e2b.app/templates/{templateID}/builds/{buildID}/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.e2b.app/templates/{templateID}/builds/{buildID}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"logs": [],
"logEntries": [],
"templateID": "<string>",
"buildID": "<string>",
"status": "building",
"reason": {
"message": "<string>",
"step": "<string>",
"logEntries": []
}
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Templates
Get build status
Get template build info
GET
/
templates
/
{templateID}
/
builds
/
{buildID}
/
status
Get build status
curl --request GET \
--url https://api.e2b.app/templates/{templateID}/builds/{buildID}/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.e2b.app/templates/{templateID}/builds/{buildID}/status"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.e2b.app/templates/{templateID}/builds/{buildID}/status', 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://api.e2b.app/templates/{templateID}/builds/{buildID}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.e2b.app/templates/{templateID}/builds/{buildID}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.e2b.app/templates/{templateID}/builds/{buildID}/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.e2b.app/templates/{templateID}/builds/{buildID}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"logs": [],
"logEntries": [],
"templateID": "<string>",
"buildID": "<string>",
"status": "building",
"reason": {
"message": "<string>",
"step": "<string>",
"logEntries": []
}
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Authorizations
Query Parameters
Index of the starting build log that should be returned with the template
Required range:
x >= 0Maximum number of logs that should be returned
Required range:
0 <= x <= 100Severity level for log entries (e.g. info, warn, error)
Response
Successfully returned the template
Build logs
Build logs structured
Show child attributes
Show child attributes
Identifier of the template
Identifier of the build
Status of the template build
Available options:
building, waiting, ready, error, uploaded Show child attributes
Show child attributes
Was this page helpful?