Skip to content

List the models a key can read

GET
/data/delivery/v1/models
curl --request GET \
--url https://api.ebitex.io/data/delivery/v1/models \
--header 'Authorization: Bearer <token>'

Lists the models in the key’s partition that it may read, and names that partition (partition.key), each model with the fields it may see: the field’s id, name, type, whether it is mandatory, a list of values or localized, and, for a field the model declared queryable, which of filter, sort and facet it supports. A model’s parent is the key of the model it inherits from, or null when there is none or the key may not read it. A model’s nameField is the id of the field that carries a record’s name, or null. A field that has settings carries them as settings; a component field’s model constraint is settings.allowedModels, a list of model keys that already includes every model the key can read that descends from one named (an empty list means no model the key can read, an absent one any model: absent and empty are different answers). An abstract model is listed so its fields can be understood, but holds no records.

Read this before you query: it is the list of what you may ask.

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.

{ "partition": { "key": "default" }, "models": [{ "key": "dog", "name": "Dog", "abstract": false, "parent": null, "fields": [] }] }

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.

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.