Skip to main content

Snapshot of server_price

GET 

/snapshot/:hash/server_price/:vendor

Snapshot of the server_price 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 active or planned-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/*.
  • Prices (price, price_upfront, price_monthly and the tiers of price_tiered) converted to USD, unrounded, with currency set to USD. Rows whose prices can't be converted (a currency missing from the exchange rates) are left out.
  • 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​

Successful Response