Snapshot of storage
GET/snapshot/:hash/storage/:vendor
Snapshot of the storage table for one vendor. A vendor without rows in the table gets empty arrays.
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.
Contents:
- Only available records: status
activeorplanned-for-retirement. Inactive and retired records are left out, and so are rows that reference them (e.g. the prices of a retired server, or of an inactive zone). - Every column of the table except
observed_at: the hash already identifies the data version. For per-row timestamps, use/table/*. - Sorted by the table's primary key.
- Columnar 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: one array per column, with one element per row, all arrays of the same length.
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
- 200
- 401
- 404
- 406
- 422
- 503
Successful Response
No API key.
Hash not available (problem type /problems/snapshot-not-available), or unknown table, vendor or malformed id (/problems/not-found).
The request doesn't accept gzip.
Validation Error
The hash is being prepared on this replica (problem type /problems/snapshot-preparing): retry the same request after Retry-After seconds.