Re: REST API documentation

Anonymous
Not applicable

REST API documentation

HI, can you refer me to documentions & example codes for using Marketo Rest API for java development?
thanks,
Tags (1)
10 REPLIES 10
Dory_Viscoglio
Level 10

Re: REST API documentation

Hi Amnon, you can find the developer guides here: http://developers.marketo.com/documentation/rest/
Anonymous
Not applicable

Re: REST API documentation

But there are no java examples of REST there. i wanted to know if anyone knows of where i can find such examples.
thanks
Anonymous
Not applicable

Re: REST API documentation

Currently, examples for the REST API in Java are not available. Here are examples for PHP and Ruby:

https://github.com/dchesterton/marketo-rest-api

https://github.com/jalemieux/mkto_rest
Anonymous
Not applicable

Re: REST API documentation

Hi, the problem is i am trying to figure out how the json response looks like and there is no documentation that covers this fully.
For example this is what is shown in documentaiton for get lead: but this is not full, i see i am also getting "errors".
How can i know what response to expect?
  1. {
  2. "requestId":"e42b#14272d07d78",
  3. "success":true,
  4. "result":[
  5. {
  6. "id":60,
  7. "email":"kjashaedd@klooblept.com",
  8. "firstName":"Kataldar",
  9. "updatedAt":"2013-11-21T11:47:30-08:00"
  10. }
  11. ]
  12. }
thanks,
Anonymous
Not applicable

Re: REST API documentation

Could you please post the request you are making and error you are getting?
Anonymous
Not applicable

Re: REST API documentation

I fixed the problem. but i need to build the java rest objects according to the errors i receive.
If there is a missing field error i add a field. isn't there a java rest api library i can use that has all the objects for the rest call?

Another question, when i do Get Lead by Id i only get a few of the Lead's fields. how can i get the fields i want of the lead?
thanks
Anonymous
Not applicable

Re: REST API documentation

Hi Amnon,

The REST API is still somewhat limited, and Get Lead by Id does indeed return a small subset of the fields from a Lead record.

You may want to explore the SOAP API, instead of REST, which allows you to fetch all of the built-in and custom fields via a getLead call. It is a little more complicated, but is more mature, and there are more examples around the web for complex operations.

There are also Java code examples and a simple library provided by Marketo in this Github repository.

I hope this is more what you were looking for; if you are accessing the API programmatically, the added complexity is likely not a huge issue.

Best,
Kyle
Anonymous
Not applicable

Re: REST API documentation

Hi. i do use the SOAP API currently. I wanted to move to REST API cause i understood it is now ready for use and of course it is preferable to use it then SOAP.
As for the get Lead, i guess i can not use it for now.


Anonymous
Not applicable

Re: REST API documentation

Hi, so now, i am trying to work with update Lead and rest API. in SOAP i could pass a map which was dynamically created and i didn't have to know the fields in advance.
in Rest, it is defined that "input" field should be Array of lead records to create or update
how can i send a map dynamicaly created with changing attributes?
thanks