Assets

Assets are derived from the selected template and represent the individual Leader data elements.

Create an asset

via API call

Just like templates, assets can also be created via an API call.
See also Data Management API.

Create an Asset
<api>
    <organizationId>Virtimo</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset</context>
            <method>create</method>
            <parameters>
                <asset>
                    <version>
                        <childTemplates />
                        <customId>Benutzerdefinierte ID</customId>
                        <description></description>
                        <versionedAttributes>
                            <attribute>
                                <key>key1</key>
                                <value>val1</value>
                            </attribute>
                            <attribute>
                                <key>key2</key>
                                <value>val2</value>
                            </attribute>
                        </versionedAttributes>
                    </version>
                    <unversionedAttributes />
                </asset>
                <templateId>40</templateId>
            </parameters>
        </request>
    </requests>
</api>

in the BPC

Assets can be created in the BPC interface, provided that at least one template already exists.
See Create Data.

Edit an Asset

via API call

Update via ID
<api>
    <organizationId>Virtimo</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset</context>
            <method>update</method>
            <parameters>
                <asset>
                    <version>
                        <childTemplates/>
                        <customId>NEU3</customId>
                        <description></description>
                        <versionedAttributes>
                            <attribute>
                                <key>newID</key>
                                <value></value>
                            </attribute>
                        </versionedAttributes>
                    </version>
                    <unversionedAttributes/>
                    <id>483</id>
                </asset>
            </parameters>
        </request>
    </requests>
</api>
Update via CustomID
<api>
    <organizationId>Virtimo</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset</context>
            <method>update</method>

            <parameters>
                <asset>
                    <version>
                        <customId>asset_custom_id_6</customId>
                        <template>
                            <customId>template_custom_id_1</customId>
                        </template>
                        <childTemplates/>
                        <description></description>
                        <versionedAttributes>
                            <attribute>
                                <key>VirtimoID</key>
                                <value>val1</value>
                            </attribute>
                        </versionedAttributes>
                    </version>
                    <unversionedAttributes/>
                </asset>
            </parameters>
        </request>
    </requests>
</api>

in BPC

In the BPC interface, assets—that is, Leader data elements—are updated directly via the Leader data details.
See Edit Data.

Attribute Properties

Property Description Example

key*

Primary key that identifies an attribute.
If "Labels" or "displayName" are not specified, these values are set to "key".

<key>status</key>

attributes

An attribute of the "complex" or "group" class may contain sub-attributes. In a given asset, the structure is ./attribute/attributes/* for an attribute of type "group".

value

Value of an attribute. Can be a text node (for an attribute of type "basic") or an element node (for an attribute of any type in the "complex" class).

Filtering Assets

You can distinguish between the methods get and query. The get method is particularly useful if you already know exactly which assets you need, since it involves a specific query based on IDs. With the query method, you select specific assets based on the attributes you’re looking for.

Difference between Get and Query

These fields are returned exclusively with the get request. The difference between the two requests lies in the history and unversioned attributes.

  • allVersions

  • activeVersion

  • unversionedAttributes

Get method

The Get method filters assets based on the parameters id, customId + templateId, and customId + templateCustomId.

Get request with asset id
<api>
	<organizationId>supermarkt</organizationId>
	<locale>de</locale>
	<requests>
		<request>
			<context>asset</context>
			<method>get</method>
			<parameters>
          		<id>537</id>
			</parameters>
		</request>
    </requests>
</api>
Get request with customId + templateId
<api>
	<organizationId>supermarkt</organizationId>
	<locale>de</locale>
	<requests>
		<request>
			<context>asset</context>
			<method>get</method>
			<parameters>
                <templateId>55</templateId>
                <customId>Beispiel Mineralwasser</customId>
			</parameters>
		</request>
    </requests>
</api>
Get request for multiple specific assets
<api>
	<organizationId>supermarkt</organizationId>
	<locale>de</locale>
	<requests>
		<request>
			<context>asset</context>
			<method>get</method>
			<parameters>
          		<id>537</id>
			</parameters>
		</request>
         <request>
			<context>asset</context>
			<method>get</method>
			<parameters>
          		<id>534</id>
			</parameters>
		</request>
    </requests>
</api>

Query Method

General Structure of Filter/Sorter Queries
<api>
    <organizationId>organizationID</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset/template</context>
            <method>query</method>
            <parameters>
                  <sparse>true/false</sparse>
                  <getActions>true/false</getActions>
			      <verbosity>0</verbosity> (integers above the selected number)
                  <withoutHiddenAttributes>true/false</withoutHiddenAttributes>
                  <limit>120</limit> (paging limit)
                  <start>0</start> (paging start)
                  <sorters>
                    <sorter>
                    <key>Jedes Attribut im Asset</key>
                    <direction>asc/desc</direction>
                    </sorter>
                  </sorters>
                  <filters>
                    <filter>
                        <key>Jedes Attribut im Asset</key>
                        <operator>Filter Class Operator</operator>
                        <value>Gesuchter Wert</value>
                    </filter>
                  </filters>
            </parameters>
        </request>
    </requests>
</api>

You can use the query method to define and filter specific queries.

All assets in this template
<api>
    <organizationId>supermarkt</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>asset</context>
            <method>query</method>
            <withUser>false</withUser>
            <parameters>
                <filters>
              <filter>
                <key>template.id</key>
                <operator>=</operator>
                <value>54</value>
              </filter>
            </filters>
            </parameters>
        </request>
    </requests>
</api>

Filter classes

Class Type Operations BPC view

id
(of asset)

number

=, in, not in, !=

- Display field and button to open the “Select Asset” dialog
- The displayName of the selected asset is shown in the display field

boolean

boolean

=, !=

CheckBox

date

date

=, < =, <, !=, >, >=

Date field

dateTime

dateTime

< =, <, >, >=

In date and time fields

enum

String

=, in, not in, !=

ComboBox (multi-selection enabled)

number

number

=, < =, <, !=, >, >=, in, not in

Number wheel

string

string

=, contains, contains not, !=

Text field

templateId

number

=, in, not in, !=

- Display field and button to open the “Select Template” dialog
- The displayName of the selected template is shown in the display field

time

time

< =, <, >, >=

Time field

userId

number

=, in, not in, !=

ComboBox with all displayNames of all users in the organization

Examples

Creates search filters in the BPC user interface via API call
Example Template - Excerpt
<api>
    <organizationId>supermarkt</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>query</context>
            <method>create</method>
            <parameters>
                <query>
                    <visibility>user</visibility>
                    <description>Suchkriterien1</description>
                    <filters>
                        <filter>
                            <key>displayName</key>
                            <operator>contains</operator>
                            <value>ID</value>
                        </filter>
                    </filters>
                </query>
                <return>true</return>
            </parameters>
            <withUser>false</withUser>
        </request>
    </requests>
</api>
Filter based on all saved search filters
Example Template - Excerpt
<api>
    <organizationId>EZY_ONE</organizationId>
    <locale>de</locale>
    <requests>
        <request>
            <context>query</context>
            <method>query</method>
            <parameters>
            </parameters>
            <withUser>false</withUser>
        </request>
    </requests>
</api>
Template and derived asset for the "enum" attribute
Example Template - Excerpt
<attribute>
    <key>state</key>
    <labels>
        <de>Zustand</de>
        <en>State</en>
    </labels>
    <type>enum</type>
    <readOnly>true</readOnly>
    <enums>
        <enum>
            <colorCode><value>00FF00</value></colorCode>
            <key>connected</key>
            <labels>
                <de>Verbunden</de>
                <en>Connected</en>
            </labels>
        </enum>
        <enum>
            <colorCode><value>FF0000</value></colorCode>
            <key>disconnected</key>
            <labels>
                <de>Getrennt</de>
                <en>Disconnected</en>
            </labels>
        </enum>
    </enums>
</attribute>
Example of Derived Asset - Excerpt
<attribute>
    <key>state</key>
    <value>connected</value>
</attribute>
Template and Derived Asset for the "group" Attribute
Example Template - Excerpt
<attribute>
    <key>configuration</key>
    <labels>
        <de>Konfiguration</de>
        <en>Configuration</en>
    </labels>
    <type>group</type>
    <attributes>
        <attribute>
            <key>nominalPower</key>
            <labels>
                <de>Nennleistung</de>
                <en>Nominal Power</en>
            </labels>
            <unit>kW</unit>
            <type>number</type>
        </attribute>
        <attribute>
            <key>minimumPower</key>
            <labels>
                <de>Minimalleistung</de>
                <en>Minimum Power</en>
            </labels>
            <unit>kW</unit>
            <type>number</type>
        </attribute>
    </attributes>
</attribute>
Example of Derived Asset - Excerpt
<attribute>
    <key>configuration</key>
    <attributes>
        <attribute>
            <key>nominalPower</key>
            <value>100000</value>
        </attribute>
        <attribute>
            <key>minimumPower</key>
            <value>80000</value>
        </attribute>
    </attributes>
</attribute>
Template and Derived Asset for the "list" Attribute
Example Template - Excerpt
<attribute>
    <key>notes</key>
    <labels>
        <de>Notizen</de>
        <en>Notes</en>
    </labels>
    <type>list</type>
    <unique>true</unique>
    <maxQuantity>10</maxQuantity>
    <attribute>
        <type>string</type>
        <maxLength>100</maxLength>
    </attribute>
</attribute>
Example of a Derived Asset - Excerpt
<attribute>
    <key>notes</key>
    <value>
        <items>
            <item>Milch</item>
            <item>Birnen</item>
            <item>Kaffee</item>
        </items>
    </value>
</attribute>
Template and Derived Asset for the "table" Attribute
Example Template - Excerpt
<attribute>
    <key>flowers</key>
    <labels>
        <de>Blumen</de>
        <en>Flowers</en>
    </labels>
    <type>table</type>
    <maxQuantity>10</maxQuantity>
    <attributes>
        <attribute>
            <key>name</key>
            <labels>
                <de>Name</de>
                <en>Name</en>
            </labels>
            <type>string</type>
            <required>true</required>
        </attribute>
        <attribute>
            <key>color</key>
            <labels>
                <de>Farbe</de>
                <en>Color</en>
            </labels>
            <type>string</type>
        </attribute>
        <attribute>
            <key>quantity</key>
            <labels>
                <de>Anzahl</de>
                <en>Quantity</en>
            </labels>
            <type>number</type>
            <decimalPlaces>0</decimalPlaces>
        </attribute>
    </attributes>
</attribute>
Example of a Derived Asset - Excerpt
<attribute>
    <key>flowers</key>
    <value>
        <rows>
            <row>
                <name>Glockenblume</name>
                <color>Gelb</color>
                <quantity>5</quantity>
            </row>
            <row>
                <name>Tulpe</name>
                <color>Lila</color>
                <quantity>10</quantity>
            </row>
            <row>
                <name>Nelke</name>
                <color>Weiß</color>
                <quantity>5</quantity>
            </row>
        </rows>
    </value>
</attribute>