Search parameters

You can add search parameters to your query, read the reference documentation for the Content Delivery API for a full list of search parameters supported. There are however some differences:

  • The CMA does not support the include and locale parameters
  • The CMA supports relevance as an option for the order parameter on entry collection queries, ordering search results based on how relevant they are to a vectorized interpretation of the given search term
  • The CMA supports a fields._displayField virtual token for the select parameter on entry collection queries (see Display field selector)

With the introduction of tags, you can query for entries / assets by their tags via the CMA.

Display field selector

In addition to the standard select operator, the CMA accepts a virtual token, fields._displayField, on the entries collection endpoint. When the token is included in select, the API resolves each entry’s display field from its content type and returns the value under the field’s real name.

The token is composable: combine it with any other tokens you would normally pass to select, or use it on its own.

Unlike standard field selectors, fields._displayField does not require the content_type query parameter, so it can resolve the display field across entries from different content types in a single request.

For example:

$# Only the resolved display field for each entry
$/spaces/<space_id>/environments/<environment_id>/entries?select=fields._displayField
$
$# sys plus the resolved display field
$/spaces/<space_id>/environments/<environment_id>/entries?select=sys,fields._displayField
$
$# combined with an explicit field selector (requires content_type)
$/spaces/<space_id>/environments/<environment_id>/entries?content_type=<product_content_type_id>&select=sys,fields.body,fields._displayField

Resolution notes:

  • If the entry’s content type has no displayField, or the display field has no value, the entry is returned without fields.
  • The resolved display field is not duplicated if it already appears in the select list.
  • If the bare fields selector is also present (e.g. select=sys,fields,fields._displayField), the token is a no-op and the full entry is returned.

Use the Get all entries of a Space endpoint, see example:

/spaces/yadj1kx9rmg0/environments/staging/entries?select=fields._displayField

To resolve the display field for each entry across content types.