# Get all logs
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs" \
-H "Authorization: Bearer runtm_xxx"
# Get only build logs
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?type=build" \
-H "Authorization: Bearer runtm_xxx"
# Search for errors
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?search=error,failed" \
-H "Authorization: Bearer runtm_xxx"
import requests
# Get runtime logs with search
response = requests.get(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs",
headers={"Authorization": "Bearer runtm_xxx"},
params={
"type": "runtime",
"lines": 100,
"search": "error"
}
)
data = response.json()
for log in data["logs"]:
print(f"[{log['log_type']}] {log['content']}")
const params = new URLSearchParams({
type: "runtime",
lines: "100",
search: "error"
});
const response = await fetch(
`https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?${params}`,
{
headers: {
"Authorization": "Bearer runtm_xxx"
}
}
);
const data = await response.json();
data.logs.forEach(log => {
console.log(`[${log.log_type}] ${log.content}`);
});
{
"deployment_id": "dep_abc123xyz",
"logs": [
{
"log_type": "build",
"content": "Step 1/12: FROM python:3.11-slim...\nStep 2/12: WORKDIR /app...",
"created_at": "2024-01-15T10:30:45Z"
},
{
"log_type": "deploy",
"content": "Creating machine... done\nWaiting for health check... passed",
"created_at": "2024-01-15T10:31:30Z"
},
{
"log_type": "runtime",
"content": "INFO: Application startup complete.\nINFO: Uvicorn running on http://0.0.0.0:8080",
"created_at": "2024-01-15T10:32:00Z"
}
],
"source": "stored"
}
{
"deployment_id": "dep_abc123xyz",
"logs": [],
"source": "fly",
"instructions": "Runtime logs are available via the Fly.io CLI:\n\n fly logs -a my-api-abc123\n\nInstall flyctl: curl -L https://fly.io/install.sh | sh"
}
Logs
Get Logs
Retrieve build, deploy, and runtime logs
GET
/
v0
/
deployments
/
{deployment_id}
/
logs
# Get all logs
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs" \
-H "Authorization: Bearer runtm_xxx"
# Get only build logs
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?type=build" \
-H "Authorization: Bearer runtm_xxx"
# Search for errors
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?search=error,failed" \
-H "Authorization: Bearer runtm_xxx"
import requests
# Get runtime logs with search
response = requests.get(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs",
headers={"Authorization": "Bearer runtm_xxx"},
params={
"type": "runtime",
"lines": 100,
"search": "error"
}
)
data = response.json()
for log in data["logs"]:
print(f"[{log['log_type']}] {log['content']}")
const params = new URLSearchParams({
type: "runtime",
lines: "100",
search: "error"
});
const response = await fetch(
`https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?${params}`,
{
headers: {
"Authorization": "Bearer runtm_xxx"
}
}
);
const data = await response.json();
data.logs.forEach(log => {
console.log(`[${log.log_type}] ${log.content}`);
});
{
"deployment_id": "dep_abc123xyz",
"logs": [
{
"log_type": "build",
"content": "Step 1/12: FROM python:3.11-slim...\nStep 2/12: WORKDIR /app...",
"created_at": "2024-01-15T10:30:45Z"
},
{
"log_type": "deploy",
"content": "Creating machine... done\nWaiting for health check... passed",
"created_at": "2024-01-15T10:31:30Z"
},
{
"log_type": "runtime",
"content": "INFO: Application startup complete.\nINFO: Uvicorn running on http://0.0.0.0:8080",
"created_at": "2024-01-15T10:32:00Z"
}
],
"source": "stored"
}
{
"deployment_id": "dep_abc123xyz",
"logs": [],
"source": "fly",
"instructions": "Runtime logs are available via the Fly.io CLI:\n\n fly logs -a my-api-abc123\n\nInstall flyctl: curl -L https://fly.io/install.sh | sh"
}
Get logs for a deployment. Supports filtering by log type and searching within logs.
Path Parameters
string
required
The deployment ID (e.g.,
dep_abc123xyz)Query Parameters
string
Log type:
build, deploy, or runtime. If omitted, returns all types.integer
default:"20"
Number of runtime log lines to include (1-500)
string
Filter logs containing this text. Supports:
- Single term:
error - Multiple terms (OR):
error,warning,failed - Regex patterns:
HTTP.*[45]\d\d
Response
string
The deployment ID
array
string
Log source:
stored (database) or fly (live from Fly.io)string
Instructions for getting logs if unavailable via API
# Get all logs
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs" \
-H "Authorization: Bearer runtm_xxx"
# Get only build logs
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?type=build" \
-H "Authorization: Bearer runtm_xxx"
# Search for errors
curl -X GET "https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?search=error,failed" \
-H "Authorization: Bearer runtm_xxx"
import requests
# Get runtime logs with search
response = requests.get(
"https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs",
headers={"Authorization": "Bearer runtm_xxx"},
params={
"type": "runtime",
"lines": 100,
"search": "error"
}
)
data = response.json()
for log in data["logs"]:
print(f"[{log['log_type']}] {log['content']}")
const params = new URLSearchParams({
type: "runtime",
lines: "100",
search: "error"
});
const response = await fetch(
`https://app.runtm.com/api/v0/deployments/dep_abc123xyz/logs?${params}`,
{
headers: {
"Authorization": "Bearer runtm_xxx"
}
}
);
const data = await response.json();
data.logs.forEach(log => {
console.log(`[${log.log_type}] ${log.content}`);
});
{
"deployment_id": "dep_abc123xyz",
"logs": [
{
"log_type": "build",
"content": "Step 1/12: FROM python:3.11-slim...\nStep 2/12: WORKDIR /app...",
"created_at": "2024-01-15T10:30:45Z"
},
{
"log_type": "deploy",
"content": "Creating machine... done\nWaiting for health check... passed",
"created_at": "2024-01-15T10:31:30Z"
},
{
"log_type": "runtime",
"content": "INFO: Application startup complete.\nINFO: Uvicorn running on http://0.0.0.0:8080",
"created_at": "2024-01-15T10:32:00Z"
}
],
"source": "stored"
}
{
"deployment_id": "dep_abc123xyz",
"logs": [],
"source": "fly",
"instructions": "Runtime logs are available via the Fly.io CLI:\n\n fly logs -a my-api-abc123\n\nInstall flyctl: curl -L https://fly.io/install.sh | sh"
}
Build and deploy logs are stored permanently. Runtime logs are fetched live from Fly.io and may not be available if the app is not running.