Using entries

Entries are designed to be consumed across multiple touchpoints in your digital experiences. You can integrate entries into compositions, use them in patterns for reusability, or access them directly through APIs and SDKs for custom applications.

This guide covers the different ways to consume and use your entries.

The most common way to use entries is by connecting them to your compositions and patterns through data resources. This allows content creators to build experiences visually while leveraging structured content.

To connect entries to compositions or patterns, you need to create a data resource from a Uniform Content data type.

For each content type that has at least one entry, two data types are automatically generated:

  1. One for selecting a single entry
  2. One for querying multiple entries of the same content type

These autogenerated data types have an Autogenerated pill in the listing of data types under Experience > Data types. You can modify autogenerated data types like any other data type, but the Autogenerated pill will be removed once saved.

autogenerated-content-data-types
Autogenerated data types for a content type

You can create additional data types beyond the autogenerated ones. These archetypes are available for Uniform Content data sources:

  • Single entry: Allows you to select a single entry
  • Single entry by slug: Allows you to select a single entry by its slug, useful with dynamic routes
  • Multiple entries: Allows you to select multiple entries
  • Query entries: Allows you to query entries based on a set of conditions
content-archetypes
Available archetypes for Uniform Content data types

Publishing requirements for entries

Unless you activate unpublished content mode on your data source, you need to publish new or modified entries to use them in data resources on compositions or component patterns.

  • New entries: Must be published before they can be selected in data resources
  • Modified entries: Must be republished for changes to appear in data resources

When configuring data resources, you can use all search and filter capabilities to find the right entry to select. However, once a selection has been made, this search is not saved with the data resource.

single-entry-data-resource
Select a single entry in a data resource by using search and filter capabilities

The "Query entries" archetype defines a search query that returns a "live" list of entries matching the query criteria. Unlike static selection archetypes, the search result changes over time when matching entries are added, changed, or removed.

When configuring a "Query entries" data resource, you can use the same search and filter capabilities as when managing entries, plus additional query settings:

  • Search field: Can be a static value or based on a dynamic input
  • Search filters: Allows static values or dynamic inputs for system properties, entry metadata and custom fields
  • Sort by: Sort results by system property, entry metadata or custom field (static values or dynamic inputs)
  • Show locale: Defines which locale entries should be returned in
  • Records to fetch: Maximum number of entries returned by the query
  • Start from: Skip records and start at a specific index (useful for pagination)

Locale fallbacks for entries

You can specify a comma-separated list of locales to act as a fallback chain if the entry doesn't have translations in the specified locale. The first matching locale on an entry will be returned.

entries-query-data-resource
Querying entries in a data resource

Entries can be integrated into all three types of patterns in Uniform. A key benefit of using entries in patterns is that the mapping of entry fields to component parameters is pre-configured by content architects. This means content editors only need to select which entry to display without having to worry about how to connect individual entry fields to component parameters.

Optimize performance with levels to resolve

When configuring data types for entries in patterns, set appropriate levels to resolve to improve performance:

  • Lists of entries: Use lower levels to resolve (1-2) since only high-level data like titles and summaries are typically displayed
  • Single entries: Use deeper levels to resolve (2-3) when more detailed information needs to be shown, such as full content, metadata, or nested references

Component patterns can use entries through pattern data resources, allowing you to create reusable components that automatically pull content from your entries. This eliminates the need for content editors to manually configure data mappings for each component instance.

For detailed information on creating and managing component patterns, see the component patterns guide. For configuration options, refer to pattern data resources.

Preview entries in different component patterns

To see how an entry looks across different component patterns (like a hero or card), create a dynamic composition that includes all relevant patterns. This helps content editors preview their content in various contexts. See the preview compositions article for details.

Composition patterns can incorporate entries as data sources for entire page structures. This allows you to:

  • Dynamic compositions: Create composition patterns with pre-connected entry data for consistent page layouts for dynamic routes
  • Content-driven experiences: Build composition patterns where the component structure adapts based on entry content and metadata
  • Multi-source integration: Combine entries with other data sources within a single composition pattern

Entry patterns with entries#

Entry patterns can reference other entries as data sources, enabling content relationships such as:

  • Dynamic content inclusion: Use entries as data sources to automatically populate common fields across multiple entries
  • Content templates: Build entry patterns that combine static structure with dynamic entry-based content

When using entries in patterns, you can configure pattern data resources to control how entries are consumed. For detailed configuration options including static references, overridable selection, and optional data resources, see the pattern data resources documentation.

Content entries can be used as data resources in other entries, allowing you to dynamically include shared field values like product names, pricing, or terms. This is accomplished through dynamic tokens placed in entry fields.

A common use case is to create a Dictionary term content type that represents common terms and copy values.

Best practices for using entries as data resources in other entries

  • If you want to define a relationship between entries, use the References field type
  • Keep the number of entries used as data resources to a minimum and use the Single entry archetype with a low resolution level setting to avoid performance issues
  • Avoid Multiple entries and Query data types for common copy values, as the index-based referencing system may cause values to be swapped when dynamic tokens are resolved

For custom applications, headless implementations, or when you need programmatic access to your content, you can consume entries directly using Uniform's APIs or SDKs.

Entries can be accessed via two different Uniform APIs:

Uniform Edge Delivery API (Recommended for most applications)

  • Used for retrieving entries for delivery purposes
  • Runs on the CDN edge for optimal performance
  • Supports resolving "edgehanced" values in dynamic tokens
  • API endpoint: /api/v1/entries

Uniform Platform API

  • Used for managing and retrieving entries for management purposes
  • Does not support resolving "edgehanced" values in dynamic tokens
  • API endpoint: /api/v1/entries

The Canvas SDK provides a convenient JavaScript/TypeScript interface for accessing entries:

import { ContentClient, } from '@uniformdev/canvas'; const contentClient = new ContentClient({ apiKey: <canvasApiKey>, projectId: <projectId>, }); // Example: fetch 20 recipe entries with search term "pizza" // ordered by modification date descending const recipes = await contentClient .getEntries({ filters: { type: { eq: 'recipe' }, }, search: 'pizza', limit: 20, orderBy: 'updated_at_DESC', }) .then(recipes => { return recipes.entries; });

This approach gives you full control over how and where your content is used, making it ideal for:

  • Building custom frontends or mobile applications
  • Integrating content into existing systems
  • Creating custom search or filtering experiences
  • Feeding content to third-party services