Examples of other operations on groups

Using operations of the Configuration Web Service, you can obtain a group summary with the group's key, name and the number of standard attributes. You can also obtain a number of attributes in a specific group, as well as import, export and update groups (although these operations are used primarily through Studio).

Getting group summary information

The listGroup operation returns summary information about the attribute groups that are currently defined in the Endeca data domain. The group summary information consists of:

  • The name of the group (the key attribute), which uses the NCName format.
  • The display name of the group (the displayName attribute), which uses a non-NCName-format. This name is typically used in front-end displays where a user-friendly format is needed.
  • The number of standard attributes that are members of the group (the cardinality attribute). Note that the names of the member standard attributes are not listed.
The listGroup operation takes no arguments. For example:
<soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0" 
   xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:configTransaction>
         <ns:listGroups/>
      </ns:configTransaction>
   </soapenv:Body>
</soapenv:Envelope>
The response should look similar to this example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <config-types:results xmlns:config-types="http://www.endeca.com/MDEX/config/services/types/3/0">
         <groupSummaries xmlns="http://www.endeca.com/MDEX/config/XQuery/2009/09">
            <groupSummary key="Channels" cardinality="6" displayName="Channels"/>
            <groupSummary key="Countries" cardinality="10" displayName="Countries"/>
            <groupSummary key="Customers" cardinality="30" displayName="Customers"/>
            <groupSummary key="Products" cardinality="22" displayName="Products"/>
            <groupSummary key="Promotions" cardinality="11" displayName="Promotions"/>
            <groupSummary key="Sales" cardinality="16" displayName="Sales"/>
            <groupSummary key="Times" cardinality="38" displayName="Times"/>
            <groupSummary key="system-navigation_InternalGroup" cardinality="54"/>
         </groupSummaries>
      </config-types:results>
   </soapenv:Body>
</soapenv:Envelope>

This group summary example shows that there are seven user-created attribute groups (such as Channels and Products). The group named system-navigation_InternalGroup is a collection of system primordial attributes (such the attributes on PDRs).

Getting the member attributes of a specific group

The getGroups operation can retrieve information about one or more specific attributes, using this structure in the request:
<ns:getGroups>
   <ns1:groupSummary key="?" displayName="?" cardinality="?"/>
</ns:getGroups>
where key is the only required attribute indicating the name of the specific group. Note that the name is case sensitive.
For example, this request:
<soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0" 
   xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:configTransaction>
         <ns:getGroups>
            <ns1:groupSummary key="Channels"/>
         </ns:getGroups>
      </ns:configTransaction>
   </soapenv:Body>
</soapenv:Envelope>
returns this information about the Channels attribute group:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <config-types:results xmlns:config-types="http://www.endeca.com/MDEX/config/services/types/3/0">
         <groups xmlns="http://www.endeca.com/MDEX/config/XQuery/2009/09">
            <group key="Channels" displayName="Channels">
               <mdex-property_Key type="mdex:string" xmlns="">CHANNEL_CLASS</mdex-property_Key>
               <mdex-property_Key type="mdex:string" xmlns="">CHANNEL_CLASS_ID</mdex-property_Key>
               <mdex-property_Key type="mdex:string" xmlns="">CHANNEL_DESC</mdex-property_Key>
               <mdex-property_Key type="mdex:string" xmlns="">CHANNEL_ID</mdex-property_Key>
               <mdex-property_Key type="mdex:string" xmlns="">CHANNEL_TOTAL</mdex-property_Key>
               <mdex-property_Key type="mdex:string" xmlns="">CHANNEL_TOTAL_ID</mdex-property_Key>
            </group>
         </groups>
      </config-types:results>
   </soapenv:Body>
</soapenv:Envelope>

Getting detailed information about groups

The exportGroups operation is basically a combination of the listGroup and getGroups operations. That is, it returns a list of your attribute groups with detailed information about each group in the getGroups format. Note that while the system-navigation_InternalGroup is listed, no details are provided on its member attributes.

The exportGroups syntax is:
<ns:configTransaction>
  <ns:exportGroups/>
</ns:configTransaction>

Importing groups

To utilize importGroups, use this structure in the request:
<ns:importGroups>
   <ns1:group key="?" displayName="?">
      <mdex-property_Key>?</mdex-property_Key>
   </ns1:group>
</ns:importGroups>
where mdex-property_Key is the primary key of the group.

This request replaces the specified group with another group of the same name, but with the new list of attributes. For example, if an existing group contained three attributes, you can use importGroups to replace this group with a group that will contain only two of them. The keys for the attributes you want to include must be specified in the importGroups request.

Updating the group configuration

The updateGroupConfigs operation replaces the assignment on the group description record with a new assignment. The operation's syntax is:
<ns:updateGroupConfigs>
   <ns1:record>
      <system-group_DisplayName>?</system-group_DisplayName>
      <system-group_Key>?</system-group_Key>
   </ns1:record>
</ns:updateGroupConfigs>

You specify a system-group_Key indicating which group to update, and zero or more assignments in the group description record, such as an assignment on the display name, if an existing group does not have one.

For example, the group system-navigation_InternalGroup is a group that contains all attributes that do not belong to any user-specified groups. This group is created automatically and does not have a display name initially. To provide a display name "Other attributes" for this group, send the following request to the Configuration Web Service running on the particular data domain:
<config-service:updateGroupConfigs>
   <mdex:record>
     <system-group_DisplayName>Other Attributes</system-group_DisplayName>
     <system-group_Key>system-navigation_InternalGroup</system-group_Key>
   </mdex:record>
</config-service:updateGroupConfigs>