curl -X POST "https://app.runtm.com/api/v0/deployments" \
-H "Authorization: Bearer runtm_xxx" \
-F "[email protected]" \
-F "[email protected]" \
-F 'secrets={"DATABASE_URL": "postgres://..."}'
import requests
with open("runtm.yaml", "rb") as manifest, open("artifact.zip", "rb") as artifact:
response = requests.post(
"https://app.runtm.com/api/v0/deployments",
headers={"Authorization": "Bearer runtm_xxx"},
files={
"manifest": ("runtm.yaml", manifest),
"artifact": ("artifact.zip", artifact),
},
data={
"secrets": '{"DATABASE_URL": "postgres://..."}'
}
)
data = response.json()
print(f"Deployment {data['deployment_id']} created")
const formData = new FormData();
formData.append("manifest", manifestFile);
formData.append("artifact", artifactZip);
formData.append("secrets", JSON.stringify({
DATABASE_URL: "postgres://..."
}));
const response = await fetch(
"https://app.runtm.com/api/v0/deployments",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx"
},
body: formData
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id} created`);
{
"deployment_id": "dep_abc123xyz",
"name": "my-api",
"state": "queued",
"url": null,
"version": 1,
"is_latest": true,
"previous_deployment_id": null,
"template": "backend-service",
"runtime": "python",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"detail": {
"error": "Invalid manifest",
"message": "Missing required field: name"
}
}
{
"detail": {
"error": "Artifact too large",
"size_bytes": 25000000,
"max_bytes": 20971520
}
}
Deployments
Create Deployment
Create a new deployment or redeploy an existing one
POST
/
v0
/
deployments
curl -X POST "https://app.runtm.com/api/v0/deployments" \
-H "Authorization: Bearer runtm_xxx" \
-F "[email protected]" \
-F "[email protected]" \
-F 'secrets={"DATABASE_URL": "postgres://..."}'
import requests
with open("runtm.yaml", "rb") as manifest, open("artifact.zip", "rb") as artifact:
response = requests.post(
"https://app.runtm.com/api/v0/deployments",
headers={"Authorization": "Bearer runtm_xxx"},
files={
"manifest": ("runtm.yaml", manifest),
"artifact": ("artifact.zip", artifact),
},
data={
"secrets": '{"DATABASE_URL": "postgres://..."}'
}
)
data = response.json()
print(f"Deployment {data['deployment_id']} created")
const formData = new FormData();
formData.append("manifest", manifestFile);
formData.append("artifact", artifactZip);
formData.append("secrets", JSON.stringify({
DATABASE_URL: "postgres://..."
}));
const response = await fetch(
"https://app.runtm.com/api/v0/deployments",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx"
},
body: formData
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id} created`);
{
"deployment_id": "dep_abc123xyz",
"name": "my-api",
"state": "queued",
"url": null,
"version": 1,
"is_latest": true,
"previous_deployment_id": null,
"template": "backend-service",
"runtime": "python",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"detail": {
"error": "Invalid manifest",
"message": "Missing required field: name"
}
}
{
"detail": {
"error": "Artifact too large",
"size_bytes": 25000000,
"max_bytes": 20971520
}
}
Deploy a new application or update an existing one. Accepts a multipart form with the manifest and artifact.
Request Body
Query Parameters
Headers
Response
curl -X POST "https://app.runtm.com/api/v0/deployments" \
-H "Authorization: Bearer runtm_xxx" \
-F "[email protected]" \
-F "[email protected]" \
-F 'secrets={"DATABASE_URL": "postgres://..."}'
import requests
with open("runtm.yaml", "rb") as manifest, open("artifact.zip", "rb") as artifact:
response = requests.post(
"https://app.runtm.com/api/v0/deployments",
headers={"Authorization": "Bearer runtm_xxx"},
files={
"manifest": ("runtm.yaml", manifest),
"artifact": ("artifact.zip", artifact),
},
data={
"secrets": '{"DATABASE_URL": "postgres://..."}'
}
)
data = response.json()
print(f"Deployment {data['deployment_id']} created")
const formData = new FormData();
formData.append("manifest", manifestFile);
formData.append("artifact", artifactZip);
formData.append("secrets", JSON.stringify({
DATABASE_URL: "postgres://..."
}));
const response = await fetch(
"https://app.runtm.com/api/v0/deployments",
{
method: "POST",
headers: {
"Authorization": "Bearer runtm_xxx"
},
body: formData
}
);
const data = await response.json();
console.log(`Deployment ${data.deployment_id} created`);
{
"deployment_id": "dep_abc123xyz",
"name": "my-api",
"state": "queued",
"url": null,
"version": 1,
"is_latest": true,
"previous_deployment_id": null,
"template": "backend-service",
"runtime": "python",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
{
"detail": {
"error": "Invalid manifest",
"message": "Missing required field: name"
}
}
{
"detail": {
"error": "Artifact too large",
"size_bytes": 25000000,
"max_bytes": 20971520
}
}