Getting data from the api

Anonymous
Not applicable

Getting data from the api

Hi,

I'm presently developing a system requiring an incremental extraction of every changed information since a specified date. With the api I can list and describe objects, but the list is not complete and I found no way to get incremental changes on these objects (I supposed getMObjects would do the job but it doesn't).

How can I do?

Emmanuel
Tags (1)
4 REPLIES 4
Anonymous
Not applicable

Re: Getting data from the api

Which object are you looking to get data on?
Anonymous
Not applicable

Re: Getting data from the api

All of them. In fact, it would have been good if I had been able to query the server for a list of extractable objects. That was what I expected to do with the listMObjects but it's not complete, there are missing objects like "campaign".

Anyway, I'm probably doing something wrong, because I'm unable to get data from the getMObjects function using the values returned from the listMObjects. 

Suppose that I want all the leads of my account. 

When I send this :

      <mkt:paramsGetMObjects>
         <type>LeadRecord</type>
         <mObjCriteriaList>
            <mObjCriteria>
               <attrName>Id</attrName>
               <comparison>GT</comparison>
               <attrValue>0</attrValue>
            </mObjCriteria>
         </mObjCriteriaList>
      </mkt:paramsGetMObjects>

I receive this :

      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Client</faultcode>
         <faultstring>MObject type unknown</faultstring>
         <detail>
            <ns1:serviceException xmlns:ns1="http://www.marketo.com/mktows/">
               <name>mktServiceException</name>
               <message>Unknown MObject type 'LeadRecord'</message>
               <code>10001</code>
               <cause/>
            </ns1:serviceException>
         </detail>
      </SOAP-ENV:Fault>
 
I got the LeadRecord name in the listMObjects returned list. I tried with 'Lead' without the 'Record' suffix, it didn't find it either. The only object I got working is 'Program', that I found in your examples. But it is not in the list returned from listMObjects. So I'm a little confused.

Best regards,
Emmanuel
Anonymous
Not applicable

Re: Getting data from the api

If you want to pull leads out you need to use the getMultipleLeads API call and if you want activity it is getLeadChanges. MObjects you would use for pulling data on Opportunities.

I'd recommend skimming through the calls listed here: http://developers.marketo.com/documentation/soap/ and building on top of that.
Anonymous
Not applicable

Re: Getting data from the api

And what about campaigns?