4.1 Invoke Discovery Actions

The following example shows the request that a protocol client sends to put a couple of discovery sources on legal hold. To do so, the protocol client calls the InvokeDiscoveryActions request message with the actions to apply as shown:

 <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
   <s:Header>
     <a:Action s:mustUnderstand="1">http://tempuri.org/IDiscoveryServiceApplication/InvokeDiscoveryActions</a:Action>
     <a:MessageID>urn:uuid:7c697165-7b28-4df7-9f37-e6cd60b7ca75</a:MessageID>
     <a:ReplyTo>
       <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
     </a:ReplyTo>
     <ServiceContext xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/sharepoint/servicecontext">
       <correlationId>00000000-0000-0000-0000-000000000000</correlationId>
       <language>en-US</language>
       <region>en-US</region>
       <siteSubscriptionId i:nil="true"></siteSubscriptionId>
     </ServiceContext>
   </s:Header>
   <s:Body>
     <InvokeDiscoveryActions xmlns="http://tempuri.org/">
       <discoveryConsoleId>541b75dc-07f7-422a-8990-2ee8b1e70613</discoveryConsoleId>
       <rawPartitionId>0c37852b-34d0-418e-91c6-2ac25af4be5b</rawPartitionId>
       <actions xmlns:d4p1="http://www.microsoft.com/sharepoint/search/KnownTypes/2010/11" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <d4p1:DiscoveryAction>
           <d4p1:ActionId>74a7709b-5aa9-4cb1-b405-39177166af9b</d4p1:ActionId>
           <d4p1:ActionType>CreateHold</d4p1:ActionType>
           <d4p1:CaseId>3d652524-93a7-4e6b-ad10-5f52c781a66a</d4p1:CaseId>
           <d4p1:ContainerId>http://contoso/sites/DiscoveryTest/TestWeb0</d4p1:ContainerId>
           <d4p1:CorrelationId>00000000-0000-0000-0000-000000000000</d4p1:CorrelationId>
           <d4p1:DiscoveryConsoleId>541b75dc-07f7-422a-8990-2ee8b1e70613</d4p1:DiscoveryConsoleId>
           <d4p1:ExternalFederationId>00000000-0000-0000-0000-000000000000</d4p1:ExternalFederationId>
           <d4p1:FederationId>00000000-0000-0000-0000-000000000000</d4p1:FederationId>
           <d4p1:HoldId>6dc65c15-9477-4e97-95bc-51a6c04a962e</d4p1:HoldId>
           <d4p1:PreservationListQuery></d4p1:PreservationListQuery>
           <d4p1:Query></d4p1:Query>
           <d4p1:TimeCreated>0001-01-01T00:00:00</d4p1:TimeCreated>
           <d4p1:WebId>46fea5d1-5ae1-419f-b617-53a3bb15eb8e</d4p1:WebId>
         </d4p1:DiscoveryAction>
         <d4p1:DiscoveryAction>
           <d4p1:ActionId>db03d91e-3fd0-4eca-99ff-caa00bd1d7c0</d4p1:ActionId>
           <d4p1:ActionType>CreateHold</d4p1:ActionType>
           <d4p1:CaseId>3d652524-93a7-4e6b-ad10-5f52c781a66a</d4p1:CaseId>
           <d4p1:ContainerId>http://contoso/sites/DiscoveryTest/TestWeb1</d4p1:ContainerId>
           <d4p1:CorrelationId>00000000-0000-0000-0000-000000000000</d4p1:CorrelationId>
           <d4p1:DiscoveryConsoleId>541b75dc-07f7-422a-8990-2ee8b1e70613</d4p1:DiscoveryConsoleId>
           <d4p1:ExternalFederationId>00000000-0000-0000-0000-000000000000</d4p1:ExternalFederationId>
           <d4p1:FederationId>00000000-0000-0000-0000-000000000000</d4p1:FederationId>
           <d4p1:HoldId>6dc65c15-9477-4e97-95bc-51a6c04a962e</d4p1:HoldId>
           <d4p1:PreservationListQuery></d4p1:PreservationListQuery>
           <d4p1:Query></d4p1:Query>
           <d4p1:TimeCreated>0001-01-01T00:00:00</d4p1:TimeCreated>
           <d4p1:WebId>06c463d3-384f-490f-b4ce-19236e7f4122</d4p1:WebId>
         </d4p1:DiscoveryAction>
       </actions>
     </InvokeDiscoveryActions>
   </s:Body>
 </s:Envelope>

The protocol server responds with an InvokeDiscoveryActionResult response message which contains the status of each of the applied actions:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

   <s:Header>
     <a:Action s:mustUnderstand="1">http://tempuri.org/IDiscoveryServiceApplication/InvokeDiscoveryActionsResponse</a:Action>
     <ActivityId CorrelationId="539ab7b2-a92b-4b91-ae7e-74b9432eb61e" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">83ede828-ca06-465b-ba1f-2e23d90b57e5</ActivityId>
     <a:RelatesTo>urn:uuid:7c697165-7b28-4df7-9f37-e6cd60b7ca75</a:RelatesTo>
     <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
       <u:Timestamp u:Id="_0">
         <u:Created>2011-04-16T07:59:46.872Z</u:Created>
         <u:Expires>2011-04-16T08:04:46.872Z</u:Expires>
       </u:Timestamp>
     </o:Security>
   </s:Header>
   <s:Body>
     <InvokeDiscoveryActionsResponse xmlns="http://tempuri.org/">
       <InvokeDiscoveryActionsResult xmlns:b="http://www.microsoft.com/sharepoint/search/KnownTypes/2010/11" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <b:DiscoveryActionStatus>
           <b:ActionId>74a7709b-5aa9-4cb1-b405-39177166af9b</b:ActionId>
           <b:ActionType>CreateHold</b:ActionType>
           <b:CaseId>3d652524-93a7-4e6b-ad10-5f52c781a66a</b:CaseId>
           <b:DiscoveryConsoleId>541b75dc-07f7-422a-8990-2ee8b1e70613</b:DiscoveryConsoleId>
           <b:ErrorMessage></b:ErrorMessage>
           <b:HoldId>6dc65c15-9477-4e97-95bc-51a6c04a962e</b:HoldId>
           <b:Status>Pending</b:Status>
           <b:TimeCreated>0001-01-01T00:00:00</b:TimeCreated>
         </b:DiscoveryActionStatus>
         <b:DiscoveryActionStatus>
           <b:ActionId>db03d91e-3fd0-4eca-99ff-caa00bd1d7c0</b:ActionId>
           <b:ActionType>CreateHold</b:ActionType>
           <b:CaseId>3d652524-93a7-4e6b-ad10-5f52c781a66a</b:CaseId>
           <b:DiscoveryConsoleId>541b75dc-07f7-422a-8990-2ee8b1e70613</b:DiscoveryConsoleId>
           <b:ErrorMessage></b:ErrorMessage>
           <b:HoldId>6dc65c15-9477-4e97-95bc-51a6c04a962e</b:HoldId>
           <b:Status>Pending</b:Status>
           <b:TimeCreated>0001-01-01T00:00:00</b:TimeCreated>
         </b:DiscoveryActionStatus>
       </InvokeDiscoveryActionsResult>
     </InvokeDiscoveryActionsResponse>
   </s:Body>
 </s:Envelope>