Skip to main content

Get Content-Backed View Models

🚧Documentation Under Construction

We are actively working to improve this documentation. The content you see here may be incomplete, subject to change, or may not fully reflect the current state of the feature. We appreciate your understanding as we continue to enhance our docs.

Content-backed view models are accessed through the Get operation's views field, allowing you to fetch transformed presentation data for a specific content item when you have its ID. This approach layers view model transformations on top of content model fetching—you first identify the content item via Get, then access computed view model representations through the views field.

This pattern assumes familiarity with the Get operation covered in the Content Models section, as you'll use the same configuration and query structure with the addition of the views field to access your ViewModel classes. Content-backed view models are ideal when you need to present a specific piece of content (like an Article) with computed fields, aggregated data, or frontend-specific transformations. The same editorial features available on content (Preview, Revisions) also work seamlessly with content-backed view models, allowing you to preview or view historical versions of transformed content.