carlos / platform Public

deploy role: read an instance's replica position, no contents Feature Request closed

Want: a credential with the deploy role can read where an instance's database replica has got to, with no contents: the last replicated transaction, its time, and how far back point-in-time history reaches.

Why: release automation for an app (say shop) wants to record a restore point just before it promotes a release whose migrations the previous build may not read. Today the only way to learn the replica's position is carlos db pull or db query, which read data, and the deploy role rightly can't do either. The automation needs a position, not data.

Shape, as a suggestion: GET /api/cli/apps/{account}/{app}/instances/{host}/replica, which returns {transaction, written_at, history_from} and is admitted for deploy (and the roles that already read instances). The CLI would print the same thing that db query prints as its first line ("up to transaction N, written T").

Not asking for: any read of rows, logs or schema.