Restore a Postgres or MySQL database into a new one, on the same cluster with the same size and availability: at targetTime (RFC 3339, within what its backups cover: from status.backup.firstRecoverabilityPoint to now for Postgres, to status.backup.lastSuccessfulBackup for MySQL) or the latest when omitted. Developers and up.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonRestore a Postgres or MySQL database into a new one, on the same cluster with the same size and availability: at targetTime (RFC 3339, within what its backups cover: from status.backup.firstRecoverabilityPoint to now for Postgres, to status.backup.lastSuccessfulBackup for MySQL) or the latest when omitted. Developers and up.
API key access: full.
op*"restoreDatabase""restoreDatabase"id*stringThe new database's id you choose: mdb_ then 4 to 40 lowercase letters, digits, dashes or underscores.
sourceId*stringThe database to restore.
name*stringThe new database's name.
targetTime?string|nullDone. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"id": "mdb_8kq2x7ad",
"name": "web",
"op": "restoreDatabase",
"sourceId": "example"
}'{}