Skip to main content
Some endpoints don’t query the source when you call. They answer from a complete copy of it that Croma keeps up to date and organized for querying: these are dataset endpoints. The rest are live lookups. A dataset endpoint:
  • answers in milliseconds and never becomes an async job,
  • keeps answering when the source is down or in maintenance,
  • searches everything the source has published, not one record per call,
  • spends 1 credit per request instead of the live 10 (see Credits).

as_of

Every dataset-served response carries as_of: the data is current up to that moment.
Each dataset refreshes on its own schedule. If you need the source’s answer as of this second, use a live endpoint where one exists.

Lookups

A third answer mode sits between the two. A lookup endpoint reads one record by its key. The first time a key is asked, Croma reads the source and keeps the answer; every call within the endpoint’s freshness window answers from that copy in milliseconds and spends nothing at the source; past it, the source is read again. Croma also re-reads stored answers on a schedule, so a value the source changes on its own calendar is caught up with. Every lookup response says when the source was last asked and where the answer came from:
served_from is copy (answered from Croma’s copy), upstream (the source was read for this call) or stale (the source could not be read and the stored answer stood in, with a warning). A key the source has nothing under returns found: false and is asked of the source again next time. Lookup endpoints carry the Lookup pill in their guide and served_from: "lookup" in the catalog, and are metered as live requests.

Which endpoints are dataset-served?

The Dataset pill in each guide and served_from in the /catalog are always current.

Live lookups

The other answer mode: the source itself, queried at request time.