Xeonr Developer Docs
API SpecificationApps

Acquire Instance

POST
/containers.api.v1.AppService/AcquireInstance

Returns the address of a ready instance, cold-starting one through the single-flight activator if none exists. Blocks up to wait_ms, clamped to the App's activation_timeout_sec (0 means that timeout); DeadlineExceeded when the budget runs out. Mainly for warmup, since hostname routing activates on request. Unimplemented without cluster access.

Access: namespace VIEWER or above (read)

Authorization

BearerAuth
AuthorizationBearer <token>

A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC token for humans. The key's namespace and role are pinned server-side.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

appId?string
Length1 <= length <= 64
waitMs?integer

Max time the caller may be blocked while cold-starting. Clamped to the App's activation_timeout_sec; 0 means that timeout. validate:skip clamped server-side to activation_timeout_sec

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://containers.xeonr.io/containers.api.v1.AppService/AcquireInstance" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "address": "string",
  "instanceId": "string",
  "coldStart": true,
  "waitedMs": 0
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}