Re: BULK Lead Extract - Retrieve Data File returns blank

Anonymous
Not applicable

BULK Lead Extract - Retrieve Data File returns blank

Hello, need some direction with Retrieve Data file as I'm not seeing any data in the results file:

here is what I'm trying to bulk extract from Leads:

{

   "fields": [

      "firstName",

      "lastName",

      "email"

   ],

   "format": "CSV",

   "columnHeaderNames": {

      "firstName": "First Name",

      "lastName": "Last Name",

      "email": "Email Address"

   },

   "filter": {

      "createdAt": {

         "startAt": "2017-10-01T00:00:00Z",

         "endAt": "2017-10-31T00:00:00Z"

      }

   }

}

The Status is Completed and there is data for the startAt and endAt dates queried above....

pastedImage_3.png

pastedImage_2.png

Yet the Retrieve API job returns a blank. using content-type=application/json after trying application/x-www-form-urlencoded - made no difference..got no results. What am I missing here.

Any pointers will be helpful

thanks in advance!

10 REPLIES 10
Kenny_Elkington
Marketo Employee

Re: BULK Lead Extract - Retrieve Data File returns blank

Do you have an example of the call that you're submitting which is returning empty?

Anonymous
Not applicable

Re: BULK Lead Extract - Retrieve Data File returns blank

Got it to work!

The exportId was listed as optional in the documentation so I was passing it as a parameter rather than inserting it in the GET  /bulk/v1/leads/export/{exportId}/file.json

Once I inserted it in the URL where it says {exportId} ...I got the data file!

SanfordWhiteman
Level 10 - Community Moderator

Re: BULK Lead Extract - Retrieve Data File returns blank

Yeah, it's always a path segment.  Not sure where you're seeing it as optional?

Anonymous
Not applicable

Re: BULK Lead Extract - Retrieve Data File returns blank

here​ .....

pastedImage_0.png

SanfordWhiteman
Level 10 - Community Moderator

Re: BULK Lead Extract - Retrieve Data File returns blank

(empty) isn't the same as optional. It means it's not a constant. All the other methods also have (empty) ​for the ​exportId.

Anonymous
Not applicable

Re: BULK Lead Extract - Retrieve Data File returns blank

yep - learnt that the hard way

Since exportId is not a constant - Is it possible to pass the exportId as a variable instead?

Example: once the exportId is generated and while it is still valid, I store it in a variable called vExportId and pass this in the URL like .....bulk/v1/leads/export/"&$(vExportId)&"/enqueue.json

Is this doable?.

SanfordWhiteman
Level 10 - Community Moderator

Re: BULK Lead Extract - Retrieve Data File returns blank

Example: once the exportId is generated and while it is still valid, I store it in a variable called vExportId and pass this in the URL like .....bulk/v1/leads/export/"&$(vExportId)&"/enqueue.json

Of course! That's the way I would expect to build URLs based on dynamic responses from Marketo. Of course vExportId only has meaning in your client app, but when you interpolate it into the URL, your app will substitute the stored value.

Anonymous
Not applicable

Re: BULK Lead Extract - Retrieve Data File returns blank

very good to know! I will try that

thanks for your responses. Appreciate it!

Anonymous
Not applicable

Re: BULK Lead Extract - Retrieve Data File returns blank

Sorry for out of context question. But can somebody let me know, how can I create bulk lead export job. Please help me out with this. Thanks in advance.

Thanks,

Vamsi