Update the Runtime Spec

PUT /v1/applications/{uuid}/runtime

Tune how a backend runs — the listening port, health check, resource requests, and replica bounds — or a serverless function's idle time, timeout and concurrency. Applies to managed, fullstack and function apps (and WordPress sites); the runtime row is created when you create the app. Requires the managed_backends entitlement, or functions_enabled for a function.

Functions: a function always listens on port 8080, serves every path and is scaled by the platform, so a change to port, backend_paths, min_replicas or max_replicas returns 400 (sending the stored value back is fine). Its CPU and memory follow the same rules as a backend's. The three function_* fields below are for functions only; on any other app they return 400.

This is a partial update: only the fields you send are changed; the rest keep their current values. CPU and memory can be set up to what your plan allows (the app reserves its memory in full and a quarter of its CPU), and the image itself is never set here — it lives on the immutable deploy so a rollback needs no rebuild.

Only a change that makes the app bigger — more CPU or memory reserved, or a higher max_replicas — is checked against your plan. Any other change (a smaller size, the port, health check, backend paths, minimum replicas, function settings) is always accepted, even when your apps already use more than your plan includes. See When your plan’s computing resources shrink.

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 for the app in millicores, from 50 up to what your plan allows (your plan’s total across your backend apps, counted per replica; at most 4000 per app). The app reserves a quarter of it and can use all of it when the node is free. GET /v1/applications/{uuid} returns the allowed range in resource_limits.
memory_mb int
Memory for the app in MiB, from 64 (256 for WordPress) up to what your plan allows (at most 8192 per app). Reserved in full.
min_replicas int
Minimum running replicas. 0–10.
max_replicas int
Maximum replicas. 1–10, and not below min_replicas. Raising it is checked against the instances per app your plan allows; an app set above that keeps its setting and runs at most the plan’s number until you upgrade.
backend_paths string[]
fullstack path-routing prefixes (each /-rooted; max 20). Default ["/api"].
function_idle_seconds int
Function only. Seconds without requests before it scales to zero, 0–3600. 0 = stay warm: it never scales to zero.
function_timeout_seconds int
Function only. The longest one request may run, 1–300 seconds (default 30). A longer request gets a 504.
function_max_concurrency int
Function only. Requests it handles at once, 1–200 (default 40). Past it, a request waits at the edge for a free slot, first come, first served (how requests work).

Response (200 OK)

runtime object
The updated spec.
applied boolean
true when the change is being rolled out to the running backend now (the live deploy is re-rolled). false when there is no live deploy yet, a rollout is already in flight, or the app is paused; the spec then applies on the next deploy or restart.

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, or the change makes the app bigger than your plan has left: its CPU / memory would take the account over its plan's total, or max_replicas is above the instances per app your plan allows.
404
Application not found, or it is a static app (no backend).
409
The app is paused over a plan limit (quota_paused). An app paused because your apps don't fit your plan's computing resources still accepts a change that doesn't make it bigger — making it smaller can resume it; a change that makes it bigger gets this 409.
Request
curl -X PUT \ "https://api.ngris.com/v1/applications/019be838-d261-7d9b-9499-71995a3a91c6/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_uuid": "019be838-d261-7d9b-9499-71995a3a91c6", "port": 8080, "health_check_path": "/healthz", "cpu_millis": 500, "memory_mb": 512, "min_replicas": 1, "max_replicas": 3, "backend_paths": "[\"/api\"]", "created_at": "2026-07-28T12:00:00Z", "updated_at": "2026-07-29T08:30:00Z" }, "applied": true }

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_uuid string (uuid)
The app's uuid. (application_id carries the same uuid string for older clients.)
runtime object
The current runtime spec (same shape as the PUT response above): application_uuid, port, health_check_path, cpu_millis, memory_mb, min_replicas, max_replicas, backend_paths (a JSON array encoded as a string), the function_* settings of a function app (omitted otherwise), created_at and updated_at.
instances array
The app's runtime instances, newest first; [] when nothing has run yet. Each has application_uuid; deploy_uuid (the deploy it runs); state (pending, ready, failed or terminated); ready_replicas; restart_count; last_error (omitted when there is none); last_seen_at (when the runtime last reported on it; omitted until it has); created_at, updated_at.

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/019be838-d261-7d9b-9499-71995a3a91c6/status" \ -H "X-API-KEY: <your_api_key>"
Response — 200 OK
{ "application_uuid": "019be838-d261-7d9b-9499-71995a3a91c6", "runtime": { "application_uuid": "019be838-d261-7d9b-9499-71995a3a91c6", "port": 8080, "health_check_path": "/healthz", "cpu_millis": 500, "memory_mb": 512, "min_replicas": 1, "max_replicas": 3, "backend_paths": "[\"/api\"]", "created_at": "2026-07-28T12:00:00Z", "updated_at": "2026-07-29T08:30:00Z" }, "instances": [ { "application_uuid": "019be838-d261-7d9b-9499-71995a3a91c6", "deploy_uuid": "019bf3d2-0116-7612-9567-75a812bf45fc", "state": "ready", "ready_replicas": 1, "restart_count": 0, "last_seen_at": "2026-07-29T08:41:12Z", "created_at": "2026-07-28T12:20:00Z", "updated_at": "2026-07-29T08:41:12Z" } ] }
Was this helpful?
Was this helpful?