curl -X POST "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
if data["valid"]:
print("Validation passed!")
else:
for error in data["errors"]:
print(f"Error: {error}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const data = await response.json();
if (data.valid) {
console.log("Validation passed!");
} else {
data.errors.forEach((e) => console.error(`Error: ${e}`));
}
{
"valid": true,
"errors": [],
"warnings": ["Consider adding a health check endpoint"],
"has_discovery_file": true,
"needs_discovery_metadata": false,
"discovery_content": "description: My app\nsummary: A web application"
}
Deploy
Validate Deploy
Validate deployment configuration before deploying
POST
/
api
/
sessions
/
{session_id}
/
deploy
/
validate
curl -X POST "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
if data["valid"]:
print("Validation passed!")
else:
for error in data["errors"]:
print(f"Error: {error}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const data = await response.json();
if (data.valid) {
console.log("Validation passed!");
} else {
data.errors.forEach((e) => console.error(`Error: ${e}`));
}
{
"valid": true,
"errors": [],
"warnings": ["Consider adding a health check endpoint"],
"has_discovery_file": true,
"needs_discovery_metadata": false,
"discovery_content": "description: My app\nsummary: A web application"
}
Runs
runtm validate inside the session sandbox and returns structured validation results. Use this before deploying to catch configuration errors early.
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
boolean
Whether the configuration passed validation.
array
List of validation error messages.
array
List of validation warning messages.
boolean
Whether a
runtm.discovery.yaml file exists.boolean
Whether discovery metadata needs to be filled in.
string | null
Current content of
runtm.discovery.yaml if it exists.curl -X POST "https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate" \
-H "Authorization: Bearer runtm_xxx"
import requests
response = requests.post(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate",
headers={"Authorization": "Bearer runtm_xxx"},
)
data = response.json()
if data["valid"]:
print("Validation passed!")
else:
for error in data["errors"]:
print(f"Error: {error}")
const response = await fetch(
"https://app.runtm.com/api/cloud/sessions/550e8400-e29b-41d4-a716-446655440000/deploy/validate",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx",
},
}
);
const data = await response.json();
if (data.valid) {
console.log("Validation passed!");
} else {
data.errors.forEach((e) => console.error(`Error: ${e}`));
}
{
"valid": true,
"errors": [],
"warnings": ["Consider adding a health check endpoint"],
"has_discovery_file": true,
"needs_discovery_metadata": false,
"discovery_content": "description: My app\nsummary: A web application"
}