Using the Marketing Cloud API I'm trying to programmatically determine the fields in an event definition. So...
- I can start with the ID of the journey and get the journey definition with
- From there I can get the eventDefinitionId and call
- And now I am stuck! I can't get the External/Customer Key for the data extension that houses the data for the event definition. I can only get the
It looks like I need to use the SOAP API to retrieve the list of fields in a Data Extension, but I can't seem to create the
simpleFilterPart that uses
ObjectID. It only seems to work when using the
CustomerKey value! (I've tested on DE's where I just grab the External Key from the UI)
Here's a snippet of the code I'm playing with. I can't get any other filter "property" to work!
$getDE = new ET_DataExtension(); $getDE->authStub = $myclient; $getDE->props = array("CustomerKey", "Name", "Status", "CategoryID", "Description", "IsSendable", "IsTestable", "PartnerKey"); $getDE->filter = array('Property' => 'CustomerKey','SimpleOperator' => 'equals','Value' => $de_key); $getResult = $getDE->get(); print_r('Get Status: '.($getResult->status ? 'true' : 'false')."\n"); print 'Code: '.$getResult->code."\n"; print 'Message: '.$getResult->message."\n"; print_r('More Results: '.($getResult->moreResults ? 'true' : 'false')."\n"); print 'Result Count: '.count($getResult->results)."\n"; print 'Results: '."\n"; print_r($getResult->results); print "\n---------------\n";