Get a record by key
const url = 'https://api.ebitex.io/data/delivery/v1/records/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ebitex.io/data/delivery/v1/records/example \ --header 'Authorization: Bearer <token>'Returns one record: its key, its model, its name, its version, when it was last changed (updatedAtUtc) and its values, keyed by field id. A reference to another record is { "mode": "reference", "provider": "data", "key": "…" }; an inline value is { "mode": "inline", "model": "…", "document": { … } }.
generations (0 to 5, default 0) follows references that many hops and puts the target beside its pointer as record, in the same shape. expand is a comma-separated list of reference field ids to follow, at any depth; without it every reference is followed. Following costs one query per hop however many references there are, and stops at 200 expanded records in a request, setting meta.truncated to true. A record that is its own ancestor is expanded once and the repeat stays a bare pointer; a record that appears in two branches, such as a shared ancestor, is expanded in each. A reference the key may not read, or whose target is missing, stays a bare pointer.
The response carries an ETag; send it back as If-None-Match and an unchanged record answers 304. Responses are private, no-cache: revalidate rather than store.
What a key sees depends on how it is restricted. A key with no origin or IP restriction is a server key and reads every model and field in its partition. A key restricted to origins or addresses is browser-safe and reads only the models their owners marked public, and only the fields marked public inside them. Something a key may not see answers exactly as something that does not exist. Folders and their access rules govern who may edit a record, not what a key reads.
Key: a Data delivery key (data.delivery.read), minted for one partition in Data. A key with an origin or IP restriction is browser-safe and sees only what models mark public.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Responses
Section titled “ Responses ”OK
invalid_generations: generations is not a whole number from 0 to 5.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired, or its partition binding was removed.
payment_required: the organization’s subscription needs attention.
scope_denied: the key lacks data.delivery.read. app_not_available: Data is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.
record_not_found: there is no such record, or the key may not read it.
rate_limited: the key spent its requests-per-minute budget; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.