logo
logo

Aggregate configuration

You can configure aggregates by selecting Aggregates in the Manage menu.

An aggregate has the following fields:

PropertyDescription
NameThe name of the aggregate.
Aggregate.ConfigurationThe JSON configuration of the aggregate.
PagesThe list of pages where this aggregate should be used.
UnsecuredWhen selected, enabled permissions are not checked for returned items. This makes the response faster.

A typical JSON configuration of an aggregate looks as follows:

{
  "entitydefinition_name": "M.Asset",
  "definitions": [
    "User",
    "UserGroup",
    "M.Asset",
    "M.Final.LifeCycle.Status",
    "M.File",
    "M.AssetType",
    "M.FileDuplicate",
    "M.Tag",
    "M.DRM.Restricted",
    "M.Localization",
    "M.Project.Deliverables.Lifecycle.Status",
    "M.Content.Repository",
    "M.AssetMedia",
    "Print.EntityGenerationTemplate"
  ],
  "includes": [
    {
      "name": "FinalLifeCycleStatusToAsset",
      "role": "Child"
    },
    {
      "name": "MasterFile",
      "role": "Parent"
    },
    {
      "name": "AssetTypeToAsset",
      "role": "Child"
    },
    {
      "name": "TagToAsset",
      "role": "Child"
    },
    {
      "name": "DRM.Restricted.RestrictedToAsset",
      "role": "Child"
    },
    {
      "name": "AssetMediaToAsset",
      "role": "Child"
    },
    {
      "name": "AssetToDraftAsset",
      "role": "Parent"
    },
    {
      "name": "AssetToDraftAsset",
      "role": "Child"
    }
  ],
  "datasources": []
}

The following table explains the different JSON properties:

PropertyDescription
entitydefinition_nameThe root definition of the aggregate that will be loaded. This should be the same definition used in the selected pages in the Pages field.
definitionsThe list of related definitions that will be loaded along with the root definition, either in the same API call or in a separate API call.
includesThe list of related definitions that will be loaded in the same API call as the root definition. The name and role properties are the name and role (parent/child) of the relation between the root definition and the related definition.
datasourcesThe taxonomies or option lists that will be loaded with the root definition.
Note

Definitions mentioned under both definitions and includes properties are loaded in the same API call as the primary definition. Definitions mentioned under definitions but not under includes will be loaded in a separate API call.

Create a new aggregate

To create an aggregate:

  1. On the menu bar, click Manage , and then click Aggregates.

  2. On the Aggregates page, click + Aggregate.

  3. In the creation dialog box, add the JSON configuration in the Configuration editor and link the corresponding pages in the Pages field.

    Note

    The Pages field specifies the pages that will use the aggregate. The linked pages need to be using the same entity defined as the aggregate. This can be cross-referenced on the Page’s configuration in the design view. Refer to the Info tab; see the Data sub-heading.

  4. Click Save.

Edit an existing aggregate

  1. In the Aggregates page, search for the aggregate you want to edit (for example, Asset).

  2. Click Edit to configure the Asset aggregate.

  3. Make the desired changes, then click Save.

Can we improve this article ? Provide feedback