> 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-tap-api/security-events.md).

# Security events

## Overview

Get events for all delivered messages to blocked URLs through the [Proofpoint TAP API](https://help.proofpoint.com/Threat_Insight_Dashboard/API_Documentation/SIEM_API) 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:

* `pp_sp` will reference your Proofpoint TAP Service Principal.
* `pp_secret` will reference your Proofpoint TAP API Secret Key.

To do it, click **Add element** and enter a **Name** for the secret (in this case, `pp_sp`). 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. Repeat the process for `pp_secret`.

{% 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: 5m
  offset: 5m
  tz: UTC
  format: RFC3339
withAuthentication: false
withEnumerationPhase: false
collectionPhase:
  paginationType: "cursor"
  cursorSelector: ".checkpoint"
  limit: 100
  initialRequest:
    method: GET
    url: "https://${parameters.proofpointDomain}/api/v1/events"
    headers:
      - name: Accept
        value: application/json
      - name: Authorization
        value: "API-Token ${secrets.proofpointToken}"
    queryParams: 
      - name: created_after
        value: "${temporalWindow.from}"
  nextRequest:
    method: GET
    url: "https://${parameters.proofpointDomain}/api/v1/events"
    headers:
      - name: Accept
        value: application/json
      - name: Authorization
        value: "API-Token ${secrets.proofpointToken}"
    queryParams: 
      - name: after_checkpoint
        value: "${pagination.cursor}"
  output:
    select: ".results"
    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> - `5m`
* **Offset**<mark style="color:$primary;">**\***</mark> - `5m`
* **Format** - `UTC`

**Authentication**

Toggle **ON** and enter the following:

* **Authentication**
  * **Type**<mark style="color:$primary;">**\***</mark> - `Basic`
* **Basic Authentication**
  * **Username**<mark style="color:$primary;">**\***</mark> - `${secrets.pp_sp}`
  * **Password**<mark style="color:$primary;">**\***</mark> - `${secrets.pp_secret}`

**Collection Phase**

* **Pagination Type**<mark style="color:red;">**\***</mark> - `None`
* **Request**
  * **Response Type**<mark style="color:red;">**\***</mark> - `JSON`
  * **Method**<mark style="color:$primary;">**\***</mark> - `GET`
  * **URL**<mark style="color:$primary;">**\***</mark> - `https://tap-api-v2.proofpoint.com/v2/siem/messages/delivered`
  * **Headers**
    * **Name** - `Accept`
    * **Value** - `text/plain`
  * **Query Params**
    * **Name** - `format`
    * **Value** - `json`
    * **Name** - `interval`
    * **Value** - `${temporalWindow.from}/${temporalWindow.to}`
* **Output**
  * **Select**<mark style="color:$primary;">**\***</mark> - `.messagesDelivered`
  * **Filter** - `.`
  * **Map** - `.`
  * **Output Mode**<mark style="color:$primary;">**\***</mark> - `.`
    {% 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.
