How to download all suppression list's records using Mailgun API
<p>I have developed the following code,</p>

<pre><code>$domain = "domain";
$event = "unsubscribes";
//$nextPage = ''; // [bounces, unsubscribes, complaints]

// Initiate download on client browser
$filename = $domain."_".$event."_".date("c").".csv";
header('Content-Type: text/csv');
header("Content-disposition: attachment; filename=".$filename);

// Make the call to the client.
$result = $mgClient-&gt;get("$domain/unsubscribes");
//$result = $mgClient-&gt;get("$domain/events/" . explode("$domain/events/", $result-&gt;http_response_body-&gt;paging-&gt;next));

$html = "&lt;table&gt;&lt;tr&gt;&lt;th&gt;Email Address&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;/tr&gt;";

if(count($result-&gt;http_response_body-&gt;items) &gt; 0) {
    foreach ($result-&gt;http_response_body-&gt;items as $key) {
         $html .= "&lt;tr&gt;
             &lt;td&gt;" .$key-&gt;address."&lt;/td&gt;&lt;/tr&gt;";
    }

} 

$html .= "&lt;/table&gt;";  

echo $html;  
</code></pre>

<p>This gives log's unsubscribes not suppression list records. How to get only all suppression list records (for instance, unsubscribe rs).   </p>