Status API
Status Endpoint
JSON endpoint for real-time monitoring of sync progress. Use it for scripting, dashboards, and automation.
Enabling the Endpoint
Pass --status-addr to expose the /status and /metrics HTTP endpoints.
godwit sync --source s3://src --dest s3://dst --status-addr :8080
curl -s localhost:8080/status | jq .Example Response
{
"run_id": "abc123",
"status": "running",
"source": "s3://my-source",
"destination": "s3://my-dest",
"objects_total": 15000,
"objects_done": 12400,
"objects_failed": 3,
"objects_skipped": 120,
"objects_excluded": 77,
"objects_pending": 2300,
"objects_running": 100,
"bytes_total": 1073741824,
"bytes_done": 858993459,
"bytes_failed": 5242880,
"bytes_skipped": 10485760,
"bytes_excluded": 2097152,
"bytes_pending": 192937573,
"bytes_running": 4980000,
"started_at": "2026-02-25T10:00:00Z",
"finished_at": null,
"eta_seconds": 42.5,
"errors": ["upload failed on path/to/file.bin: connection reset"],
"storage_classes": [
{ "storage_class": "STANDARD", "count": 14500, "total_size": 1048576000, "percent": 96.7 },
{ "storage_class": "GLACIER", "count": 500, "total_size": 25165824, "percent": 3.3 }
]
}Field Reference
Top Level
| Field | Type | Description |
|---|---|---|
| run_id | string | Unique identifier for this run |
| status | string | Run lifecycle state (running, planned, completed, failed) |
| source | string | Source URI (e.g. s3://bucket) |
| destination | string | Destination URI |
Object Counts
| Field | Type | Description |
|---|---|---|
| objects_total | int64 | Total objects discovered during planning |
| objects_done | int64 | Objects successfully transferred |
| objects_failed | int64 | Objects that failed to transfer |
| objects_skipped | int64 | Objects skipped (Glacier, unsupported key) |
| objects_excluded | int64 | Objects excluded by policy |
| objects_pending | int64 | Objects queued but not yet started |
| objects_running | int64 | Objects currently being transferred |
Byte Counts
| Field | Type | Description |
|---|---|---|
| bytes_total | int64 | Total bytes of all planned objects |
| bytes_done | int64 | Bytes successfully written |
| bytes_failed | int64 | Bytes in failed objects |
| bytes_skipped | int64 | Bytes in skipped objects |
| bytes_excluded | int64 | Bytes in excluded objects |
| bytes_pending | int64 | Bytes in pending objects |
| bytes_running | int64 | Bytes in objects currently transferring |
Timing & ETA
| Field | Type | Description |
|---|---|---|
| started_at | RFC 3339 | When the run started |
| finished_at | RFC 3339 | null | When the run finished (null while running) |
| eta_seconds | float64 | Estimated seconds to completion |
Storage Classes
| Field | Type | Description |
|---|---|---|
| storage_classes[].storage_class | string | S3 storage class name (STANDARD, GLACIER, etc.) |
| storage_classes[].count | int64 | Number of objects in this class |
| storage_classes[].total_size | int64 | Total bytes in this class |
| storage_classes[].percent | float64 | Percentage of total objects |
Run Status Values
| Value | Meaning |
|---|---|
| running | Sync is in progress |
| planned | Plan-only mode completed |
| completed | All objects transferred successfully |
| failed | One or more objects failed |
Usage Examples
Poll Until Complete
while true; do
STATUS=$(curl -s localhost:8080/status | jq -r .status)
if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then
echo "Run finished with status: $STATUS"
break
fi
sleep 5
doneProgress Snapshot
curl -s localhost:8080/status | jq '{
progress: (.objects_done / .objects_total * 100 | round),
eta: .eta_seconds,
failed: .objects_failed
}'