3

I am using the Python Fuel SDK to access Data Extensions (DEs) and Shared Data Extensions (SDEs).

I am able to list all data extensions and see all my DEs and SDEs using the FuelSDK's ET_DataExtension() object.

de = ET_Client.ET_DataExtension()
de.props = ["CustomerKey", "Name"]
getResponse = de.get()
print len(getResponse.results)
# greater than 0 for both DEs and SDEs

I am able to get rows for my DEs using FuelSDK's ET_DataExtension_Row() object.

row = ET_Client.ET_DataExtension_Row()
row.CustomerKey = DEKey
row.props = ["Name"]
getResponse = row.get()
print len(getResponse.results)
# greater than 0 if DEKey is for a DE, 0 if DEKey is for a SDE

However, when I try to access my SDE's rows using ET_DataExtension_Row() I get no results. Has anyone been able to successfully get SDE rows and if so what did you do differently?

Note I have tried using the Name instead of CustomerKey and prepending ENT. as some have suggested. I've tried modifying the QueryAllAccounts property of ws_retrieveRequest as others have suggested.

2
  • can you share your final code that worked for you? I have the same problem :)
    – gixxer
    Commented Nov 1, 2016 at 3:27
  • samual i am having same issue, can you tell how did you solve it PLEASEE!!! Commented Dec 4, 2020 at 3:24

1 Answer 1

1

Samuel, Assuming the API user doesn't have the Admin BU as their default Business Unit, you'll need to pass in a "ClientID" with your request - that of the Admin top level Business Unit which is where Shared Data Extensions live:

https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/using_clientid_in_your_soap_api_code.htm

Here's some working SOAP...

<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>
        <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>DataExtensionObject[MySharedDE]</ObjectType>
        <ClientIDs><ID>1234567</ID></ClientIDs>
        <Properties>MyField</Properties>
     </RetrieveRequest>
  </RetrieveRequestMsg>
 </soapenv:Body>
</soapenv:Envelope>
2
  • 1
    Thanks! Was able to use this and some modifications to the python FuelSDK to get results. Am now getting read timeouts receiving rows a high % of times but thats a separate issue :)
    – Harrison
    Commented Dec 10, 2015 at 17:00
  • @Harrison could you share your python updates how you get this working?
    – Pentium10
    Commented Jul 18, 2019 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .