Skip to content

Report this engine VM's state (db-agent).

POST
/v1/db-agent/status
Code sample: Shell / cURL
curl --request POST \
--url https://stratum.example.com/v1/db-agent/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "generation": 1, "engineState": "initializing", "role": "primary", "engineVersion": "example", "dataMounted": true, "dataDevice": "example", "diskUsedPercent": 1, "diskSizeBytes": 1, "dataDeviceBytes": 1, "parametersGeneration": 1, "pendingRestart": true, "parametersError": "example", "extensions": { "applied": [ "example" ], "error": "example" }, "completedOperation": "example", "failedOperation": "example", "failedOperationError": "example", "masterPasswordVersionId": "example", "backup": { "snapshotId": "example", "phase": "started", "startLsn": "example", "stopLsn": "example", "startWal": "example", "stopWal": "example", "startedAt": "2026-04-15T12:00:00Z", "stoppedAt": "2026-04-15T12:00:00Z", "error": "example" }, "walArchive": { "lastArchivedWal": "example", "lastArchivedAt": "2026-04-15T12:00:00Z", "spoolPending": 1, "lastError": "example", "lastFailedWal": "example", "lastFailedAt": "2026-04-15T12:00:00Z", "failedCount": 1 }, "recovery": { "snapshotId": "example", "phase": "recovering", "completedAt": "2026-04-15T12:00:00Z", "error": "example" }, "replication": { "inRecovery": true, "walReceiverUp": true, "receiveLsn": "example", "replayLsn": "example", "currentLsn": "example", "standbyConnected": true, "syncState": "example", "lagBytes": 1, "error": "example" }, "walLevel": "example", "blueGreen": { "deploymentId": "example", "role": "example", "phase": "example", "preconditions": [ { "code": "example", "detail": "example" } ], "slots": [ { "database": "example", "name": "example", "confirmedFlushLsn": "example", "lagBytes": 1, "active": true } ], "fenced": true, "fenceLsn": "example", "subscriptions": [ { "database": "example", "name": "example", "enabled": true, "workerUp": true, "receivedLsn": "example", "latestEndLsn": "example", "error": "example" } ], "finalized": true, "error": "example" }, "agentVersion": "example", "message": "example" }'

The agent’s observed state: whether the data volume is mounted, whether the engine is running, its role and version, the parameter generation it has applied, disk usage and the pending operation it completed. The db reconciler reads the latest report on every pass; available is only ever written from a report that says the engine is up. Own-instance only (403 NOT_OWN_INSTANCE). Cedar-gated on db:AgentStatus.

Media typeapplication/json

The engine VM’s observed state.

object
generation
required

The desired generation this report answers.

integer format: int64
engineState
required
string
Allowed values: initializing starting running recovering stopping stopped failed
role
string
Allowed values: primary standby
engineVersion

postgres --version as observed.

string
dataMounted
boolean
dataDevice
string
diskUsedPercent
number
diskSizeBytes
integer format: int64
dataDeviceBytes

The data volume’s size as the guest kernel sees it; the agent grows the filesystem to it before reporting.

integer format: int64
parametersGeneration

The parameter generation the running engine has applied.

integer format: int64
pendingRestart

pg_settings.pending_restart: a static parameter changed and waits for a restart.

boolean
parametersError

Why the rendered parameters were NOT applied: a shared_preload_libraries entry whose .so this engine image does not carry. The engine keeps running the configuration it has rather than restarting into one that cannot start.

string
extensions

The engine’s word on the curated extensions, observed in pg_extension.

object
applied

The extensions that exist in every database they belong in.

Array<string>
error

The engine’s own words for one it would not create or drop.

string
completedOperation

The pending operation the agent has just completed, if any.

string
failedOperation

A pending operation the engine refused (apply_master_password when the role change failed); the control plane gives it up instead of waiting out the rotation window.

string
failedOperationError

The engine’s own words for failedOperation, never carrying a secret.

string
masterPasswordVersionId

The secret version whose password the master role holds — the agent’s confirmation of an apply.

string
backup

The engine’s side of the snapshot handshake.

object
snapshotId
required
string
phase
required
string
Allowed values: started stopped failed
startLsn
string
stopLsn
string
startWal
string
stopWal
string
startedAt
string format: date-time
stoppedAt
string format: date-time
error
string
walArchive

The archive’s position — the last segment the agent SHIPPED to the bucket (lastArchivedAt is the instance’s latestRestorableTime), the spool’s backlog and last shipping error, and the engine archiver’s own failures.

object
lastArchivedWal
string
lastArchivedAt
string format: date-time
spoolPending
integer
lastError
string
lastFailedWal
string
lastFailedAt
string format: date-time
failedCount
integer format: int64
recovery

The replay’s report on a restored instance.

object
snapshotId
required
string
phase
required
string
Allowed values: recovering completed failed
completedAt
string format: date-time
error
string
replication

The engine’s side of the stream on a Multi-AZ member: the OBSERVED role (inRecovery, whatever the document asked — a promoted standby says false before the members are swapped), the standby’s receiver and replay lag, or the primary’s view of its standby (pg_stat_replication).

object
inRecovery
required
boolean
walReceiverUp
boolean
receiveLsn
string
replayLsn
string
currentLsn
string
standbyConnected
boolean
syncState

Pg_stat_replication’s sync_state of the named standby (sync, async, potential, quorum); empty when it is not connected.

string
lagBytes
required

Primary: WAL the standby has not replayed. Standby: received but not yet replayed.

integer format: int64
error
string
walLevel

SHOW wal_level on a running engine in a deployment (waits for logical).

string
blueGreen

The engine’s side of a blue/green deployment: the publisher’s preconditions (nothing is built while any remain), its slots’ positions and lag, the fence and its LSN; the subscriber’s subscriptions and whether it finalized.

object
deploymentId
required
string
role
required
string
phase
string
preconditions
Array<object>
object
code
required
string
detail
required
string
slots
Array<object>
object
database
required
string
name
required
string
confirmedFlushLsn
string
lagBytes
required
integer format: int64
active
required
boolean
fenced
boolean
fenceLsn
string
subscriptions
Array<object>
object
database
required
string
name
required
string
enabled
required
boolean
workerUp
required
boolean
receivedLsn
string
latestEndLsn
string
error
string
finalized
boolean
error
string
agentVersion
string
message

A short human-readable note (the last error, for instance).

string

Recorded.

Bad request.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}

Authenticated but not authorized.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}