0

Is there a the way to retrieve the row from data extension using API and without needing to specify any of the column names based on the filters.I know we can do that using the AmpScript but I couldn't find an documentation for the same using API.

I went through to this guide for API but it need to specify the exact column names to retrieve the data . But I want to retrieve the data based on filter and only the name of the data extension. Is this possible?

0

Yes. You can get the data extension column names by doing a retrieve of the DataExtensionField object with a filter on the DataExtension.CustomerKey property -- CustomerKey being the External Key of the Data Extension.

Here's a sample SOAP envelope, if that helps:

<soap:Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"
        xmlns:ns2="urn:fault.partner.exacttarget.com">
        <RetrieveRequest>
          <ObjectType>DataExtensionField</ObjectType>
          <Properties>Name</Properties>
          <Filter xsi:type="SimpleFilterPart" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Property>DataExtension.CustomerKey</Property>
            <SimpleOperator>equals</SimpleOperator>
            <Value>DE_Appointment_Reminder_H2882</Value>
          </Filter>
        </RetrieveRequest>
    </RetrieveRequestMsg>
</soap:Body>

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.