Skip to main content
GET
Get the state of a database snapshot restore
This route has a rate limit of 30 requests every 60 seconds.
string
required
The API key for your account. You can find this in your account settings.
Requires an API key with the snapshots:read scope. Returns the progress and the outcome of the database’s last snapshot restore. A database restore loads the whole snapshot into a new database before it replaces the current one, so on a large database it usually outlives the restore route’s response and answers 202 SNAPSHOT_RESTORE_PROCESSING. Poll this route until state is success or error. The outcome stays available for one hour after the restore ends. After that, or when the database was never restored, state is none.

Parameters

string
required
The ID of the database.

Response

string
Indicates whether the call was successful: success if it was, error if not.
object
The contents of the response.

Steps

Every restore starts at queued, then inspect, and ends at done. In between, a database goes through these steps, in this order: A snapshot of MySQL or MongoDB in the older format adds the step recovery. A restore that was cut short ends at the step interrupted, with the code RESTORE_INTERRUPTED. Treat a step you don’t know as “still running”: new ones can be added.

Failure codes

The codes state: "error" carries are the same ones the restore route answers with when it fails within its response time:

Polling example

Common errors