Update the Runtime Spec

PUT /v1/applications/{uuid}/runtime

Tune how a managed backend runs — the listening port, health check, resource requests, and replica bounds. Applies to managed and fullstack apps only; the runtime row is created when you create the app. Requires the managed_backends entitlement.

This is a partial update: only the fields you send are changed; the rest keep their current values. CPU and memory requests equal their limits (Guaranteed QoS), and the image itself is never set here — it lives on the immutable deploy so rollback stays instant.

Request body (application/json)

port int
The port your server listens on. 1–65535.
health_check_path string
Absolute path probed for readiness (e.g. /healthz). Default /.
cpu_millis int
CPU request/limit in millicores. 50–4000 (4 vCPU).
memory_mb int
Memory request/limit in MiB. 64–8192 (8 GiB).
min_replicas int
Minimum running replicas. 0–10.
max_replicas int
Maximum replicas. 1–10, and not below min_replicas.
backend_paths string[]
fullstack path-routing prefixes (each /-rooted; max 20). Default ["/api"].

Response (200 OK)

Returns the updated spec under runtime.

Errors

400
A field is out of range (see the bounds above) or backend_paths is invalid.
403
The managed_backends entitlement is not on your plan.
404
Application not found, or it is a static app (no backend).
Request
curl -X PUT \ "https://api.ngris.com/v1/applications/a1b2c3d4-…/runtime" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "port": 8080, "health_check_path": "/healthz", "cpu_millis": 500, "memory_mb": 512, "min_replicas": 1, "max_replicas": 3 }'
Response — 200 OK
{ "runtime": { "application_id": 42, "port": 8080, "health_check_path": "/healthz", "cpu_millis": 500, "memory_mb": 512, "min_replicas": 1, "max_replicas": 3, "backend_paths": "[\"/api\"]" } }

Get Runtime Status

GET /v1/applications/{uuid}/status

Read the live runtime status of a managed backend — the running instances and the current spec. Managed / fullstack apps only. Requires the managed_backends entitlement.

Response (200 OK)

application_id string
The app UUID.
runtime object
The current runtime spec (same shape as the PUT response above).
instances array
Running instances, each with state (pending/ready/failed/terminated), ready_replicas, restart_count, and last_error. Empty when nothing is running yet.

Errors

403
The managed_backends entitlement is not on your plan.
404
Application not found, or it is a static app (no backend).
Request
curl "https://api.ngris.com/v1/applications/a1b2c3d4-…/status" \ -H "X-API-KEY: <your_api_key>"
Response — 200 OK
{ "application_id": "a1b2c3d4-…", "runtime": { "port": 8080, "cpu_millis": 500, "memory_mb": 512, "min_replicas": 1, "max_replicas": 3 }, "instances": [ { "deploy_id": 455, "state": "ready", "ready_replicas": 1, "restart_count": 0 } ] }
Iris