Request Timeout - Marketo Rest API with batchSize 1 | Community
Skip to main content
March 13, 2015
Question

Request Timeout - Marketo Rest API with batchSize 1

  • March 13, 2015
  • 4 replies
  • 1832 views
I am sending a get request to the Get Multiple Leads by List ID rest api with a list id that contains a large number of leads. I only need the first record for validation so I am setting the batchSize to 1. However the request times out most of the times.

Is there a way to validate my request without marketo trying to fetch all the records? I just need to check if my request is valid.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Kenny_Elkington
Adobe Employee
Adobe Employee
March 13, 2015
Hi Anil,

Are you setting a client-side connection timeout?  Can you provided a (redacted) copy of the exact call which you're making?  How many records are available in your target list?
March 16, 2015
Hi Kenny,

Thanks for looking into this. We do not set any client-side connection timeout. Here is the java code we use to make the api call. Please note that we are using batchSize=1.

URL url = new URL("https://<marketo url>/rest/v1/list/<list id>/leads.json?access_token=<access token>&batchSize=1&fields=<comma separated fields>");
urlConn = (HttpsURLConnection) url.openConnection();
urlConn.setRequestMethod("GET");
urlConn.setAllowUserInteraction(false);
urlConn.setDoOutput(true);
urlConn.setRequestProperty("Content-type", "application/json");
urlConn.setRequestProperty("accept", "application/json");
int responseCode = urlConn.getResponseCode();

 
March 17, 2015
If you make this same call without specifying the batchSize parameter, do you still receive the request timeout error?
March 17, 2015
I am still seeing the timeout error after removing the batchSize parameter