Create operation


This section provides a sample adapter request and response for the Create Message operation:

Create Message operation

The Create Message operation creates a new message.

The following table describes the <items> XML and request elements for the Create Message operation:

Adapter request elements for the Create Message operation

The following figure shows a sample adapter request for the Create Message operation:

Sample adapter request for the Create Message operation

<hpom-request>
 <operation>create-message</operation>
 <username>user</username>
 <password>pass</password>
 <arguments>
   <title>Test Message Created using the Adapter</title>
   <dns-name>s-14686.synapse.com</dns-name>
   <description>Test_Message_Description</description>
   <severity>critical</severity>
   <solution>Test_Solution</solution>
   <category>Test_Category</category>
   <sub-category>test_sub_category</sub-category>
   <product-type>test_ProductType</product-type>
   <problem-type>test_ProblemType</problem-type>
   <collaboration-mode>peer</collaboration-mode>
   <type>message_type</type>
   <application>My custom app</application>
   <object>Test_Object</object>
   <correlation-key>test key</correlation-key>
   <creation-time>2009-08-26T05:10:00</creation-time>
   <custom-attributes>
     <custom-attribute>
       <key>custom_Attribute_1</key>
       <text>value_1</text>
     </custom-attribute>
   </custom-attributes>
 </arguments>
</hpom-request><hpom-request>
 <operation>create-message</operation>
 <username>user</username>
 <password>pass</password>
 <arguments>
   <title>Test Message Created using the Adapter</title>
   <dns-name>s-14686.synapse.com</dns-name>
   <description>Test_Message_Description</description>
   <severity>critical</severity>
   <solution>Test_Solution</solution>
   <category>Test_Category</category>
   <sub-category>test_sub_category</sub-category>
   <product-type>test_ProductType</product-type>
   <problem-type>test_ProblemType</problem-type>
   <collaboration-mode>peer</collaboration-mode>
   <type>message_type</type>
   <application>My custom app</application>
   <object>Test_Object</object>
   <correlation-key>test key</correlation-key>
   <creation-time>2009-08-26T05:10:00</creation-time>
   <custom-attributes>
     <custom-attribute>
       <key>custom_Attribute_1</key>
       <text>value_1</text>
     </custom-attribute>
   </custom-attributes>
 </arguments>
</hpom-request>

The following figure shows the adapter response for the sample request:

Sample adapter response for the Create Message operation

<hpom-response>
 <metadata>
   <status>success</status>
   <response-count>1</response-count>
 </metadata>
 <messages-response>
   <message-response>
     <metadata>
       <status>success</status>
       <count>1</count>
     </metadata>
     <Items>
       <Message>
         <AssignedOperator>
           <PersonAttributes>
             <Name />
           </PersonAttributes>
         </AssignedOperator>
         <MessageID>64972a0e-991b-71de-0676-ac1031690000</MessageID>
         <Title>Test Message Created using the Adapter</Title>
         <Description>Test_Message_Description</Description>
         <LifecycleState>open</LifecycleState>
         <Severity>Critical</Severity>
         <Solution>Test_Solution</Solution>
         <Category>Test_Category</Category>
         <SubCategory>test_sub_category</SubCategory>
         <ProductType>test_ProductType</ProductType>
         <ProblemType>test_ProblemType</ProblemType>
         <CollaborationMode>peer</CollaborationMode>
         <EmittingCI>
           <ConfigurationItemProperties>
             <ID />
           </ConfigurationItemProperties>
         </EmittingCI>
         <EmittingNode>
           <NodeProperties>
             <DnsName>s-14686.synapse.com</DnsName>
           </NodeProperties>
         </EmittingNode>
         <Extensions>
           <OperationsExtension>
             <Application>My custom app</Application>
             <Object>Test_Object</Object>
             <StateChangeTime>1970-01-01T05:30:00.000+05:30</StateChangeTime>
             <CreationTime>2009-08-26T05:10:00.000+05:30</CreationTime>
             <ReceivedTime>2009-09-04T11:52:59.000+05:30</ReceivedTime>
             <NumberOfDuplicates>0</NumberOfDuplicates>
             <CorrelationKey>test key</CorrelationKey>
             <ConditionMatched>false</ConditionMatched>
             <AutomaticActionStatus>notAvailable</AutomaticActionStatus>
             <OperatorActionStatus>notAvailable</OperatorActionStatus>
             <EscalationStatus>notEscalated</EscalationStatus>
             <Source>j7979488</Source>
             <NumberOfAnnotations>0</NumberOfAnnotations>
             <OriginalEvent />
             <CustomAttributes>
               <CustomAttribute>
                 <Key>custom_Attribute_1</Key>
                 <Text>value_1</Text>
               </CustomAttribute>
             </CustomAttributes>
           </OperationsExtension>
         </Extensions>
       </Message>
     </Items>
   </message-response>
 </messages-response>
</hpom-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*