Mailgun event API call

Does anyone have experience with generating an API call for ‘events’ for mailgun? I need to extract the event data by date. I understand mailgun maintains 30 days of detailed data, 365 days of monthly summarized data. I want to pull the last 30 days. I was able to use api key and make a successful connection (code 200), but I’m struggling with identifying how to pull a larger date range. It seems that it is only pulling recent data and I think it’s pulling one row. I think I read I need to create a loop to extract more data? In any event, would love some direction on best practice to extract data from event API for mailgun. Thank you and happy holidays!

Hi @ebarr ,

This question sounds like it is about understanding the Mailgun REST API.

We’re here to help with KNIME-specific questions. However, this question is likely the same whether you’re using KNIME, Postman, or any other tool to make REST calls. It probably makes more sense to ask about Mailgun on a Mailgun forum, or by reaching out to the vendor directly.

You can search the KNIME Community Hub for existing workflows, though in this case I didn’t find anything for the search term “mailgun”.

Kind regards


I’m new to using JSON and have limited experience with API requests. I have pulled a GET request for the MAILGUN platform (email platform). I added a JSON path node for the output, added my collection queries, then added an ungroup node and I’m seeing everything in a table. However, the data is only pulling data for today. In the API documentation, there are JSON calls that show how you can add a filter:

example -
Fetches the first page of log records that are older than Fri, 3 May 2013 09:00:00 -0000 and correspond to delivery to
import com.mailgun.api.v3.MailgunEventsApi;

import java.time.ZoneId;
import java.time.ZonedDateTime;

// …

public EventsResponse getEvents() {
MailgunEventsApi mailgunEventsApi = MailgunClient.config(API_KEY)

EventsQueryOptions eventsQueryOptions = EventsQueryOptions.builder()

return mailgunEventsApi.getEvents(YOUR_DOMAIN_NAME, eventsQueryOptions);


what I’m most interested in is the query builder that contains " .begin(" which lets the API pull everything from today and 5 days back. Where can I add this type of information into the GETReqeust node, or should there be another way to extract this information?

Hi @ebarr -

I merged your two threads, as they are both about Mailgun calls, to keep the forum tidy.

took some time, but I got the answer I was looking for…

the cURL was integrated into the URL in the GET node, and the additional points added as parameters:

First parameter follows a “?”, the next parameters follow and “&”. any spaces, commas, etc., use the %## format.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.