3

The online docs provide sufficient guidance on starting an automation instance, however I've been unable to locate any specifics on how to check the status of a specific automation instance. Here's an example:

Perform to start the automation:

<?xml version="1.0" encoding="UTF-8"?>
<PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
   <Action>start</Action>
   <Definitions>
     <Definition xmlns:p0="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="p0:Automation">
         <ObjectID>[Automation ID]</ObjectID>
      </Definition>
   </Definitions>
</PerformRequestMsg>

Retrieve to check status (this returns all instances):

<?xml version="1.0" encoding="UTF-8"?>
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
   <RetrieveRequest>
      <ObjectType>AutomationInstance</ObjectType>
      <Properties>CompletedTime</Properties>
      <Properties>StartTime</Properties>
      <Properties>CustomerKey</Properties>
      <Properties>Name</Properties>
      <Properties>ProgramID</Properties>
      <Filter xmlns:p0="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="p0:SimpleFilterPart">
         <Property>ProgramID</Property>
         <SimpleOperator>equals</SimpleOperator>
         <Value>[Automation ID]</Value>
      </Filter>
    </RetrieveRequest>
</RetrieveRequestMsg>

My question is how do I filter the list of automation instances based on the instance I started in the perform operation?

0

This answer will likely be of no use to the original poster considering the time frame, but for anyone who comes across this question and is confused, here is the solution:

The response JSON from the call to start the automation will include an object called "Object". This will include a field called "ObjectID" (note: this is different from the "LastRunInstanceID" and "ID" fields also on that object). This ObjectID is the ID of the AutomationInstance that you just started and that you want to check the status of.

You would then change the simple filter in your AutomationInstance RetrieveRequest call to:

 <Property>ProgramInstanceID</Property>
 <SimpleOperator>equals</SimpleOperator>
 <Value>[ObjectID]</Value>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.