[SalesForce] Marketing Cloud REST API – Show List of Data Extension

is there any REST API request to get a list of all Data Extensions in my Business Unit?

Best Answer

You'll have to use the SOAP API to retrieve DataExtension objects.

Here's a sample SOAP envelope that illustrates the structure of the call:

 <?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>user</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>
              <Properties>CategoryID</Properties>
           </RetrieveRequest>
        </RetrieveRequestMsg>
     </soapenv:Body>
  </soapenv:Envelope>

At this point in time, the SFMC SOAP API is significantly more complete/robust/whatever than the REST API. It's a good plan to follow the lead of the SFMC SDK, which utilizes both SOAP and REST.

Related Topic