Skip to main content

overview

list API

The list API is your main way of getting data out of dcupl in various ways. A DcuplList is always based on a specific model and an snapshot of its related data. The query API on the list is persistent wich means that you can build cataloge like applicatons and components with it very easily. The list API also exposes some high level functions to calcule aggregations, suggestions, facets and grouped views that let you build useful components and understand your data better.

Use the example below as a starting point to explore the API.

suggest

The suggest function returns suggestions based on a searchTerm for a specific attribute. The searchterm uses the query operater find in the to calculate the results. The relevantData parameter accepts filtered and all as input value to decide if the currently active queries should be considered in the search or not.

facets

Facet calculation can be a perfomance intensive task and should be handled with care. A facet item tells you if a specific query is set on an attribute and how many results are related to individual facet entries. You have multiple options to optimize the result by including undefined or null or unresolved values in the facets and even skip the calculation of the results itself.

groupBy

Grouped views give you an pivot like experience to visualize your data. Based on a primary attribute the list is grouped and depending on specified aggregates aggregations are calculated for each group. You can specify how individual items of the groups are returned via the items settings.

aggregate

sum

Calculates the sum of an attribute in a list.

avg

Calculates the average of all the values of an attribute in a list.

count

Returns the total amount of attributes in a list.

min

Returns the smalles value of an attribute in a list.

max

Returns the largest value of an attribute in a list.

distinct

Returns all distinct values of an attribute for the list and may also return where those attributes are found. You may want to reduce the number of calculated values using distinctOptions.limit.

group

Groups all items of a list using the defined groups in groupOptions.group. You may also include all items that are not part of a defined group using the calculateNotFound flag.