Skip to main content
GET
/
templates
/
{namespace}
/
{name}
/
{version}
/
build
/
events
Stream build logs
curl --request GET \
  --url https://www.orgo.ai/api/templates/{namespace}/{name}/{version}/build/events \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://www.orgo.ai/api/templates/{namespace}/{name}/{version}/build/events"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://www.orgo.ai/api/templates/{namespace}/{name}/{version}/build/events', 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://www.orgo.ai/api/templates/{namespace}/{name}/{version}/build/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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://www.orgo.ai/api/templates/{namespace}/{name}/{version}/build/events"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://www.orgo.ai/api/templates/{namespace}/{name}/{version}/build/events")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://www.orgo.ai/api/templates/{namespace}/{name}/{version}/build/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "ts": "2023-11-07T05:31:56Z",
  "source": "<string>",
  "line": "<string>"
}
{
"error": "Invalid API key"
}
Streams the build log as Server-Sent Events. Use it to render a live, Docker-style build console. The stream stays open for the duration of the build and closes when it reaches ready or failed. Each data: frame is a JSON object:
ts
string
Event timestamp (ISO 8601).
level
string
info, success, warn, or error.
phase
string
Build phase: publish, compile, boot, install, snapshot, record, archive, or ready. A cancelled or timed-out build ends on cancel or timeout.
source
string
Origin of the line, e.g. apt, pip, npm, or builder. Optional.
line
string
A single line of build output.

Path parameters

namespace
string
required
Template namespace.
name
string
required
Template name.
version
string
required
Version (semver).

Example

curl -N https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build/events \
  -H "Authorization: Bearer $ORGO_API_KEY"
import os, json, requests

with requests.get(
    "https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build/events",
    headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
    stream=True,
) as r:
    for raw in r.iter_lines():
        if raw and raw.startswith(b"data: "):
            event = json.loads(raw[6:])
            print(f"[{event['phase']}] {event['line']}")
// Browser: EventSource doesn't send Authorization headers, so stream with fetch.
const r = await fetch(
  "https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build/events",
  { headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}` } },
);
const reader = r.body.getReader();
const decoder = new TextDecoder();
for (;;) {
  const { value, done } = await reader.read();
  if (done) break;
  for (const line of decoder.decode(value).split("\n")) {
    if (line.startsWith("data: ")) {
      const e = JSON.parse(line.slice(6));
      console.log(`[${e.phase}] ${e.line}`);
    }
  }
}

Stream

data: {"ts":"2026-06-08T17:00:01Z","level":"info","phase":"boot","line":"booting build VM"}

data: {"ts":"2026-06-08T17:00:14Z","level":"info","phase":"install","source":"npm","line":"npm install -g @anthropic-ai/claude-code"}

data: {"ts":"2026-06-08T17:01:50Z","level":"info","phase":"archive","source":"builder","line":"uploading golden snapshot"}

data: {"ts":"2026-06-08T17:01:58Z","level":"success","phase":"ready","line":"golden snapshot ready in 118.4s"}

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Path Parameters

namespace
string
required
name
string
required
version
string
required

Response

SSE stream of BuildEvent frames

One frame of the build-events SSE stream.

ts
string<date-time>
level
enum<string>
Available options:
info,
success,
warn,
error
phase
enum<string>
Available options:
publish,
compile,
boot,
install,
snapshot,
record,
archive,
ready,
cancel,
timeout
source
string

Origin of the line, e.g. apt, pip, npm, builder.

line
string

A single line of build output.