ingestManagedAttributeValues operation

The ingestManagedAttributeValues operation allows you to load managed values into the data domain.

Within the ingestManagedAttributeValues structure, the ingestManagedAttributeValue element specifies the managed attribute to which each managed value belongs. If the managed attribute does not exist in the data domain, the service automatically creates the managed attribute.

You can use the ingestManagedAttributeValues operation to load an externally managed taxonomy (EMT) into the data domain. When loaded, externally managed taxonomies are added as managed attributes and managed values.

ingestManagedAttributeValues request syntax

An ingestManagedAttributesValues operation request uses this format:
<ingestManagedAttributeValues>
   <managedAttributeValue displayName="dName" spec="maValueSpec" 
         parentSpec="pSpec" managedAttribute="maName">
      <synonym>synName</synonym>
      <properties>
         <propName type="mdex:string">propValue</propName>
      </properties>
   </managedAttributeValue>
</ingestManagedAttributeValues>
Each ManagedAttributeValue element defines one managed value. The meanings of the attributes and sub-elements are:
Element/Attribute Purpose
managedAttribute The name of the managed attribute to which the managed value belongs. The name must use the NCName format.
displayName A name for the managed value that can be used for user interface display purposes. The name does not have to use the NCName format.
parentSpec Specifies the parent ID (managed attribute spec) for this managed value. If this is a root managed value, use a forward slash (/) as the ID. If this is a child managed value, specify the unique ID of the parent managed value.
spec A unique string identifier for the managed value. It is the responsibility of the client to provide the identifier for the request.
synonym Optionally defines the name of a synonym. You can add synonyms to a managed value so that users can search for other text strings and still get the same records as a search for the original managed value name. Synonyms can be added to both root and child managed values.
properties Optionally defines a property for a managed value. Managed value properties provide descriptive information about a given managed value and are intended to be used for display purposes by the application.

Example of adding managed attribute values

Assuming that the Component managed attribute exists, the following example adds three managed values (Derailleur, Tire, and Michelin) to it:
<soapenv:Envelope 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:ns="http://www.endeca.com/MDEX/ingest/2/0">
   <soapenv:Header/>
   <soapenv:Body>
     <ns:ingestManagedAttributeValues>
       <ns:managedAttributeValue displayName="derailleur gears" spec="Derailleur" parentSpec="/" 
           managedAttribute="Component">
         <ns:synonym>Chain</ns:synonym>
         <ns:synonym>Gear</ns:synonym>
       </ns:managedAttributeValue>
       <ns:managedAttributeValue displayName="bicycle tires" spec="Tire" parentSpec="/" 
           managedAttribute="Component">
         <ns:properties>
           <myStrProp type="mdex:string">source:CAS</myStrProp>
         </ns:properties>
       </ns:managedAttributeValue>
       <ns:managedAttributeValue displayName="Michelin brand" spec="Michelin"
           parentSpec="Tire" managedAttribute="Component">
       </ns:managedAttributeValue>
     </ns:ingestManagedAttributeValues>
   </soapenv:Body>
</soapenv:Envelope>

In the example, the Derailleur and Tire managed values are at the root of the Component managed attribute, while the Michelin managed value is a child of the Tire managed value. Note also that two synonyms were created for the Derailleur managed value and a string property (named myStrProp) was created for the Tire managed values.

Note that if the Component managed attribute did not previously exist, the request would create it with default settings for its PDR and DDR.