Track service restore progress using the API
You can track restore progress for individual nodes during service node replacement by using the Aiven API. For example, use this endpoint to monitor the restore progress of a forked service or when applying maintenance.
The service object exposes restore progress under node_states[].progress_updates:
service.node_states[]contains per-node state entries.- When a node is restoring or catching up, its
stateis typicallysyncing_data. - When the state is
syncing_data, the node may includeprogress_updateswith one or more phase objects. - Other node states don't include restore progress data.
progress_updates may be missing or empty even when a node is in syncing_data. This
can occur when a restore completes before detailed progress is reported or when the
service does not emit detailed progress counters.
API endpoints
Restore progress fields are part of the standard service response payload.
- Get a single service (recommended for polling):
GET /project/{project}/service/{service_name} - List services in a project:
GET /project/{project}/service
- Request
- Response
curl -H "Authorization: aivenv1 API_TOKEN" https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME
Replace the following placeholders:
API_TOKEN: Your Aiven API token.PROJECT_NAME: Your Aiven project name.SERVICE_NAME: The name of your service.
{
"service": {
...
"node_states": [
{
"node_name": "...",
"state": "syncing_data",
"progress_updates": [
{
"phase": "basebackup",
"completed": false,
"current": 3410567,
"min": 0,
"max": 7569280,
"unit": "bytes_uncompressed"
}
]
}
],
...
}
}
Node states
Common values for node_states[].state include:
setting_up_vm: The virtual machine is being created or initialized.syncing_data: The node is restoring data or catching up.running: The node is operating normally.leaving: The node is leaving the cluster.unknown: A transient or error state.
progress_updates data model
progress_updates is a list of phase objects. When present, phases appear in the
following order:
preparebasebackupstreamfinalize
Each phase object includes the following fields:
{
"completed": false,
"current": 3410567,
"max": 7569280,
"min": 0,
"phase": "basebackup",
"unit": "bytes_uncompressed"
}