0

we are retrieving the available Data Extensions in an account using the SOAP request:

  <?xml version="1.0" encoding="utf-8"?>
  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
           <wsse:UsernameToken wsu:Id="UsernameToken-32259181" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
              <wsse:Username>username</wsse:Username>
              <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
           </wsse:UsernameToken>
        </wsse:Security>
     </soapenv:Header>
     <soapenv:Body>
        <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
           <RetrieveRequest>
              <ObjectType>DataExtension</ObjectType>
              <Properties>CustomerKey</Properties>
              <Properties>Name</Properties>
           </RetrieveRequest>
        </RetrieveRequestMsg>
     </soapenv:Body>
  </soapenv:Envelope>

This works fine. However, I would like to retrieve the folder and subfolder to each Data Extension as it appears in ExactTarget:

data extension folders

That is, for each Data Extension I want to build a breadcrumb trail to the Data Extension like:

Star > 202546_Star-MemberSurvey > NameOfDataExtension

I've checked the Data Extension Objects and note that there is a CategoryID property which looks like it could be related to the folder that the DE resides in, but I'm not sure how to get the name of the folder, or retrieve a parent folder.

2

you can request "ParentFolder.ID and "ParentFolder.Name" as properties in your DataFolder RetrieveRequest. With that information, you can use recursive logic to match up ParentFolder.ID to ID and rebuild your DataFolder paths.

0

Please see below link for details on how to retrieve folders from your account via the API. I've also included possible ContentType values that are needed. For your use case, you would use "dataextension". Hope this helps!

https://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/creating_retrieving_updating_and_deleting_folders/

The ContentType is required.  Few possible values:

    content 
    dataextension 
    email
    group 
    image
    job
    list
    publication 
    suppression_list 
    survey
    template 
    triggered_send
    userinitiatedsends
  • This is exactly what I needed, thanks for the pointer, its working fine now! – Eliot Harper Sep 22 '14 at 5:23
  • Use ContentType asset for content builder folder location – mattcameron Apr 5 '17 at 2:45

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.