REST API

HTTP endpoints exposed by gaet serve.

Start the dashboard

gaet serve
gaet serve --no-open

The default port is 6161 and can be changed with GAET_DASHBOARD_PORT.

Endpoints

MethodPath
GET/api/status
GET/api/check
GET/api/doctor
GET/api/diff
GET/api/export
GET/api/detect
GET/api/logs
POST/api/local/test
POST/api/remote/test
GET/api/snapshots
GET/api/snapshots/download
POST/api/snapshots/delete
GET, POST/api/config
POST/api/push
POST/api/fetch
POST/api/restore
GET, POST, DELETE/api/schedule
POST/api/stop
GET/api/jobs
GET/api/jobs/{id}

Status and diagnostics

GET /api/status

Returns local_ok, the resolved host, port, user, and database, whether a password is set, remote configuration state, the environment file path, scheduler state, and per-table row counts.

GET /api/check
GET /api/doctor
GET /api/diff

These wrap the matching CLI checks. /api/export returns the environment as shell exports, /api/detect lists local PostgreSQL instances, and /api/logs accepts an optional lines query parameter.

Connection tests

POST /api/local/test
Content-Type: application/json

{"url": "postgresql://user:pass@127.0.0.1:5432/app"}

The local test accepts url or local_url. Without a URL it uses the configured local connection. The remote test accepts url or remote_url plus an optional sslmode, and falls back to the configured remote URL.

Both respond with ok, connected, msg, and output.

Snapshots

GET /api/snapshots
GET /api/snapshots/download?file=gaet_20260101_120000.dump
POST /api/snapshots/delete?file=gaet_20260101_120000.dump

Download streams the archive as an attachment. Delete accepts the filename in the query string or in a JSON body as filename or file. Path separators and .. are rejected.

Configuration

GET /api/config

Returns config, masked_config, and env_file. Keys containing PASS, SECRET, or URL are masked in masked_config.

POST /api/config
Content-Type: application/json

{"config": {"GAET_RETENTION_DAYS": "14"}}

An empty value deletes the key. Values that still contain a mask are ignored, so submitting the masked form does not overwrite a stored secret. The environment file is rewritten with 0600 permissions.

Backup operations

POST /api/push
Content-Type: application/json

{"dry_run": true}
POST /api/fetch
POST /api/restore
Content-Type: application/json

{"filename": "gaet_20260101_120000.dump"}

Restore defaults to latest when no filename is provided. Fetch and restore always run with confirmation enabled because the request itself is the confirmation.

Asynchronous jobs

Add ?async=1 to a push, fetch, or restore request to run it in the background. The response is 202 with ok, job_id, and status:

POST /api/push?async=1

Poll the job:

GET /api/jobs
GET /api/jobs/{id}

Schedule and stop

GET /api/schedule

Returns active, hours, and the platform scheduler name.

POST /api/schedule
Content-Type: application/json

{"hours": 6}

DELETE /api/schedule and POST /api/stop both stop the scheduler.

Status codes

Wrong methods return 405, invalid snapshot filenames return 400, and missing snapshots or jobs return 404. A backup operation that fails still returns 200 with ok: false and a message, so check the body rather than the status code alone.