content/documentlists/views

Properties and content for views within a site/tenant. Views provide the schema, formatting, and associated content and entities for displaying content within a site/tenant.

JSON Example

View Properties

Property Description
fields

type: list of viewField

The list of fields to display for a view or an associated schema. For example, the address schema would display fields for postal addresses.

viewField.name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

viewField.target

type: string

Targets represent the object, such as an item to apply discounts to(products or orders) or a view field for content. Targets are the dot notations that link to the source document property. For example, firstitem for the direct level or firstitem.seconditem.thirditem for a deeper property.

filter

type: string

Used to filter and refine queries, returning data that matches the filter query. If multiple filters are used, they are ANDed together in the query. Filters use expressions to locate content based on a field and operator, such as `cn `for contains.

includeInactiveMode

type: string

Specifies how to filter views based on the status of a document.

Note:  This property requires the following criteria before it takes effect:
  • The includeInactive parameter of the GetViewDocuments operation must be set to true. This parameter is always set to true whenever a view is requested through Admin. However, if you make a request for a view through the API (using the GetViewDocuments operation), you must set the parameter to true manually. If you set the includeInactive parameter to false or leave it blank instead, then only documents within the active date range (or documents without an active date range specified) return in the view.
  • The document list requested in the view must support active date ranges. If it does not have active date ranges enabled, then the includeInactiveMode property is ignored.

You can specify the following values for this property:

all or null—all documents return in the view.

active—only documents within the active date range (or documents without an active date range specified) return in the view.

scheduled—only documents with an active date range set in the future return in the view.

activeOrScheduled—only scheduled and active documents return in the view.

ended—only documents with an active date range set in the past return in the view.

isAdminDefault

type: bool

If true, specifies that the view is the default view for a documentList or documentListType when viewed in Admin. If no view is specified as default, then the first view in the documentList or documentListType is default. Only one view within a documentList or documentListType can have this value set to true.

isVisibleInStorefront

type: bool

The isVisibleInStorefront field indicates whether documents in the view can be accessed from the Kibo eCommerce storefront application. If true, the storefront application and storefront client application (javascript tier) can GET documents from the view.

metadata

type: Mozu.Core.Api.Contracts.Json

Metadata content for entities, used by document lists, document type lists, document type, views, entity lists, and list views.

name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

usages

type: list of string

A string array that determines where the document or entity list displays. The options are entityManager, for displaying content in the Custom Schema page in Admin, and siteBuilder, for displaying content in the site tree in Site Builder (applies only to document lists). The following example demonstrates how to display content across both options:

"usages": ["siteBuilder", "entityManager"]

Operations

Operation Name Request URI Description
GetViewDocuments GET %7bdocumentListName%7d%2fviews%2f%7bviewName%7d%2fdocuments%3ffilter%3d%7bfilter%7d%26sortBy%3d%7bsortBy%7d%26pageSize%3d%7bpageSize%7d%26startIndex%3d%7bstartIndex%7d%26includeInactive%3d%7bincludeInactive%7d%26responseFields%3d%7bresponseFields%7d

Retrieves a collection of documents associated with a view.