REST API responses
Response shapes returned by the Gaet dashboard API.
Conventions
Responses are JSON. Mutation endpoints return an ok boolean and a human-readable msg. Backup failures are reported inside a 200 response with ok: false. Async requests return 202 with a job_id.
Status
{
"local_ok": true,
"host": "127.0.0.1",
"port": "5432",
"user": "postgres",
"db": "app",
"has_pass": true,
"remote_configured": true,
"remote_host": "db.example.com:5432/app",
"env_file": "/home/user/.gaet/.env",
"cron_active": false,
"cron_hours": 6,
"scheduler_name": "systemd",
"tables": [
{ "table": "users", "local": 10, "supabase": 10, "ok": true }
]
}A table count of -1 means the table exists on only one side. ok is true only when both counts match.
Snapshot item
{
"name": "gaet_20260101_120000.dump",
"filename": "gaet_20260101_120000.dump",
"size_mb": 12.4,
"mod_time": "2026-01-01 12:00:00",
"created_at": "2026-01-01T12:00:00Z",
"full_path": "/home/user/.gaet/backups/gaet_20260101_120000.dump"
}Job
{
"id": "a1b2c3",
"name": "push",
"status": "success",
"msg": "Cloud push completed successfully!",
"started_at": "2026-01-01T12:00:00Z",
"finished_at": "2026-01-01T12:00:42Z"
}status is running, success, or failed. The single-job response also includes an ok field that is false when the job failed.
Logs
{ "logs": ["2026-01-01 12:00:00 PUSH started", "..."] }Logs are raw lines from gaet.log and cron.log, oldest first. An empty result returns a single No log entries found. line.
Configuration
{
"config": { "GAET_RETENTION_DAYS": "14" },
"masked_config": { "GAET_REMOTE_URL": "postgresql://user:****@host/db" },
"env_file": "/home/user/.gaet/.env"
}Keys containing PASS, SECRET, or URL are masked only in masked_config. Use the masked form when rendering settings.
Connection tests
{
"ok": true,
"connected": true,
"msg": "Local PostgreSQL ping successful! (postgres@127.0.0.1:5432/app)",
"output": "Local PostgreSQL ping successful! (postgres@127.0.0.1:5432/app)"
}CLI JSON output
The CLI and HTTP handlers use separate response paths. Treat gaet check --json, gaet diff --json, and endpoint responses as command-specific contracts.