curl -X POST "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
if data["api_reachable"] and data["credentials_present"]:
print(f"Ready to deploy (latency: {data['latency_ms']}ms)")
else:
print("Preflight failed - check connectivity or credentials")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const data = await response.json();
if (data.api_reachable && data.credentials_present) {
console.log(`Ready to deploy (latency: ${data.latency_ms}ms)`);
} else {
console.log("Preflight failed - check connectivity or credentials");
}
{
"api_url": "https://app.runtm.com",
"api_reachable": true,
"http_status": 200,
"latency_ms": 45,
"credentials_present": true,
"configured_api_url": "https://app.runtm.com"
}
Deploy
Deploy Preflight
Run pre-deploy connectivity and credential checks
POST
/
api
/
sessions
/
{session_id}
/
deploy
/
preflight
curl -X POST "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
if data["api_reachable"] and data["credentials_present"]:
print(f"Ready to deploy (latency: {data['latency_ms']}ms)")
else:
print("Preflight failed - check connectivity or credentials")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const data = await response.json();
if (data.api_reachable && data.credentials_present) {
console.log(`Ready to deploy (latency: ${data.latency_ms}ms)`);
} else {
console.log("Preflight failed - check connectivity or credentials");
}
{
"api_url": "https://app.runtm.com",
"api_reachable": true,
"http_status": 200,
"latency_ms": 45,
"credentials_present": true,
"configured_api_url": "https://app.runtm.com"
}
Performs pre-deployment checks from inside the sandbox: verifies API connectivity, checks for stored credentials, and reports the configured API URL. Use this to diagnose deploy failures caused by network or auth issues.
Required scope:
deployments:write
Path Parameters
string
required
The session ID (UUID).
Headers
string
required
Bearer token. Example:
Bearer runtm_xxxstring
Scope to an organization.
Response
string
The expected API URL the sandbox should reach.
boolean
Whether the sandbox can reach the API health endpoint.
integer | null
HTTP status code from the health check, or
null if unreachable.integer | null
Round-trip latency in milliseconds, or
null if unreachable.boolean
Whether runtm credentials are stored in the sandbox.
string | null
The API URL configured in the sandbox’s runtm CLI config.
curl -X POST "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
if data["api_reachable"] and data["credentials_present"]:
print(f"Ready to deploy (latency: {data['latency_ms']}ms)")
else:
print("Preflight failed - check connectivity or credentials")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/preflight",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const data = await response.json();
if (data.api_reachable && data.credentials_present) {
console.log(`Ready to deploy (latency: ${data.latency_ms}ms)`);
} else {
console.log("Preflight failed - check connectivity or credentials");
}
{
"api_url": "https://app.runtm.com",
"api_reachable": true,
"http_status": 200,
"latency_ms": 45,
"credentials_present": true,
"configured_api_url": "https://app.runtm.com"
}