> For the complete documentation index, see [llms.txt](https://docs.onum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onum.com/listeners/listener-integrations/pull-data-from-http-endpoints/pull-data-from-proofpoint-apis/pull-data-from-the-proofpoint-zenguide-results-api.md).

# Pull data from the Proofpoint ZenGuide Results API

## Overview

Get phishing events through the [Proofpoint ZenGuide Results API](https://proofpoint.securityeducation.com/api/reporting/documentation/#api-API_Endpoints-PhishAlarmFunction) using the **HTTP Pull** Listener.

### HTTP Pull Listener configuration <a href="#http-pull-listener-configuration" id="http-pull-listener-configuration"></a>

In Falcon Onum, go to the **Listeners** area and click **New Listener > HTTP Pull**. Give a name to your new Listener and enter the following data:

### Parameters

N/A

### Secrets

You must define these credentials in Onum:

* `x-apikey-token` will reference your Proofpoint ZenGuide token.

To do it, click **Add element** and enter a **Name** for the secret (in this case, `x-apikey-token`). Then, click the **Value** field and select **New secret** to create a new one:

* Give the secret a **Name**.
* Turn off the **Expiration date** option.
* Click **Add new value** and paste the secret corresponding to the value.
* Click **Save**.

You can now select the secret you just created in the corresponding field.

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/settings/organization-settings/secrets-management.md).
{% endhint %}

### Setup <a href="#setup" id="setup"></a>

After entering the required parameters and secrets, you can choose to manually enter the rest of configuration fields, or simply paste the given YAML:

{% tabs %}
{% tab title="Config as YAML" %}
Toggle **ON** the **Config as YAML** option to enable a free text field where you can paste the following YAML:

```yaml
withTemporalWindow: true
temporalWindow:
  duration: 24h
  offset: 24h
  tz: UTC
  format: "2006-01-02T15:04:05"
withAuthentication: false
withEnumerationPhase: false
collectionPhase:
  paginationType: "page"
  isZeroIndex: false
  pageSize: 100
  request:
    responseType: json
    method: "GET"
    url: "https://results.us.securityeducation.com:443/api/reporting/v0.3.0/phishalarm"
    headers:
      - name: x-apikey-token
        value: ${secrets.x-apikey-token}
    queryParams: 
      - name: filter[_includearchivecampaigns]
        value: "TRUE"
      - name: filter[_receiveddate_start]
        value: ${temporalWindow.from}
  output:
    select: ".data"
    map: "."
    outputMode: "element"
```

{% endtab %}

{% tab title="Manually configure" %}
**Temporal Window**

Toggle **ON** to add a temporal window for events. This repeatedly shifts the time window over which data is collected.

* **Duration**<mark style="color:$primary;">**\***</mark> - `24h`
* **Offset**<mark style="color:$primary;">**\***</mark> - `24h`
* **Format** - `UTC`

**Collection Phase**

* **Pagination Type**<mark style="color:red;">**\***</mark> - `PageNumber/PageSize`
* **Zero Index**<mark style="color:$primary;">**\***</mark> - `False`
* **Page Size**<mark style="color:$primary;">**\***</mark> - `100`
* **Request**
  * **Response Type**<mark style="color:red;">**\***</mark> - `JSON`
  * **Method**<mark style="color:$primary;">**\***</mark> - `GET`
  * **URL**<mark style="color:$primary;">**\***</mark> - `https://results.us.securityeducation.com:443/api/reporting/v0.3.0/phishalarm`
  * **Headers**
    * **Name** - `x-apikey-token`
    * **Value** - `${secrets.x-apikey-token}`
  * **Query Params**
    * **Name** - `filter[_includearchivecampaigns]`
    * **Value** - `TRUE`
    * **Name** - `filter[_receiveddate_start]`
    * **Value** - `${temporalWindow.from}`
* **Output**
  * **Select**<mark style="color:$primary;">**\***</mark> - `.data`
  * **Map** - `.`
  * **Output Mode**<mark style="color:$primary;">**\***</mark> - `element`
    {% endtab %}
    {% endtabs %}

When you're done, click **Create labels** to move on to the next step and define the required [Labels](https://app.gitbook.com/o/9sm794iTBacZSmhxRER6/s/kxZeV4nlXcIAjMGZxzLI/the-workspace/listeners/labels) if needed.
