Skip to main content

Snapshot manifest

GET 

/snapshot/:hash

Every snapshot file of a database hash, sorted by path: its route below /snapshot/{hash}/ (path), its number of rows (rows), and the SHA-256 of its uncompressed JSONJSON: JavaScript Object NotationA text format for structured data, built from objects (key-value pairs), arrays, strings, numbers, booleans, and null. Most languages and tools read and write it, which makes it a common format for API responses and benchmark output.JSONGlossary (sha256). Compare the checksums with your last refresh to skip files that didn't change, e.g. specs, regions and zones, which rarely do. The manifest also lists which tables, vendors and benchmarks the hash has.

Snapshots let you read several tables from the same version of the database: every file of one {hash} comes from the same database, so references between them always resolve, e.g. every price's server is in the server snapshot of that hash. Pin database_hash from /healthcheck at the start of a refresh, and fetch every file with it. /snapshot/{hash} lists the files with checksums, so you can skip the ones that didn't change since your last refresh.

The response is immutable for a hash, requires an APIAPI: Application Programming InterfaceA defined set of requests and responses through which one program uses another, such as a web service's HTTP endpoints or a library's functions.WikipediaGlossary key, and is sent gzipped only: send Accept-Encoding: gzip (e.g. curl --compressed), or you get a 406. A 503 of type /problems/snapshot-preparing means the replica is still downloading or building the hash: retry the same request after Retry-After seconds (for about a minute at most). A 404 of type /problems/snapshot-not-available means the hash isn't available: switch to the current hash in the response body, and fetch again the files you already fetched. A 404 of type /problems/not-found is an unknown table, vendor or id: don't retry.

Request​

Responses​

Successful Response