> 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-the-cisco-umbrella-api.md).

# Pull data from the Cisco Umbrella API

## Overview

Use the **HTTP Pull** Listener to collect data from the [Cisco Umbrella API](https://developer.cisco.com/docs/cloud-security/umbrella-api-api-reference-reports-reporting-api-activity-get-activities-all/). Currently, we support the reports endpoint.

## HTTP Pull Listener configuration

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

Add the following parameter:

* **Name** - `domain`
* **Value** - Enter your Cisco Umbrella domain name.

### Secrets

You must define these credentials in Onum:

* `cisco_auth` will reference your Umbrella Token Authorization API.

To do it, click **Add element** and enter a **Name** for the secret (in this case, `cisco_auth`). 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 **Value** field list.

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

### Setup

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: EpochMillis
withAuthentication: true
authentication:
  type: token
  token:
    request:
      method: POST
      url: https://${parameters.domain}/auth/v2/token
      headers:
        - name: Content-Type
          value: application/x-www-form-urlencoded
        - name: Accept
          value: application/json
        - name: authorization
          value: ${secrets.cisco_auth}
      bodyType: urlEncoded
      bodyParams:
        - name: grant_type
          value: client_credentials
    tokenPath: ".access_token"
    authInjection:
      in: header
      name: Authorization
      prefix: 'Bearer '
      suffix: ''
withEnumerationPhase: false
collectionPhase:
  paginationType: offsetLimit
  limit: 100
  isZeroIndex: false
  request:
    responseType: json
    method: GET
    url: https://${parameters.domain}/reports/v2/activity
    queryParams:
      - name: from
        value: ${temporalWindow.from}
      - name: to
        value: ${temporalWindow.to}
      - name: offset
        value: ${pagination.offset}
      - name: limit
        value: ${pagination.limit}
  output:
    select: ".data"
    map: "."
    outputMode: element
retry:
  statusCodes: [429, 500, 502, 503, 504]
  type: fixed 
  fixed:
    interval: 2s
```

{% 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\*** - `5m`
* **Format**<mark style="color:$primary;">**\***</mark> - `Epoch`

**Authentication**

Toggle **ON** to configure the authentication phase. This is required to get the token to pull data using **OAuth**.

* **Type**<mark style="color:red;">**\***</mark> - `Token`
* **Token Retrieve Based Authentication**
  * **Request**
    * **Method**<mark style="color:red;">**\***</mark> - `POST`
    * **URL**<mark style="color:red;">**\***</mark> - `https://${parameters.domain}/auth/v2/token`
  * **Headers**&#x20;
    * **Name** - `Content-type`
    * **Value** - `application/x-www-form-urlencoded`
    * **Name** - `Accept`
    * **Value** - `application/json`
    * **Name** - `Authorization`
    * **Value** - `${secrets.cisco_auth}`
  * **Body Type**<mark style="color:red;">**\***</mark> - `UrlEncoded`
  * **Body Params**
    * **Name** - `grant_type`
    * **Value** - `client_credentials`
* **Token Path**<mark style="color:red;">**\***</mark> - `.access_token`
* **Auth Injection**
  * **In**<mark style="color:red;">**\***</mark> - `header`
  * **Name**<mark style="color:red;">**\***</mark> - `authorization`
  * **Prefix** - `'Bearer '`
  * **Suffix** - `''`

**Retry**

Toggle **ON** and configure the following parameters:

* **Retry type**<mark style="color:$primary;">**\***</mark> - `Fixed`
* **Interval**<mark style="color:$primary;">**\***</mark> - `2s`

**Collection Phase**&#x20;

* **Pagination Type**<mark style="color:red;">**\***</mark> - `Offset/Limit`
* **Zero Index**<mark style="color:$primary;">**\***</mark> - `false`
* **Limit**<mark style="color:$primary;">**\***</mark> - `100`
* **Request**&#x20;
  * **Response Type** - `JSON`
  * **Method**<mark style="color:red;">**\***</mark> - `GET`
  * **URL**<mark style="color:red;">**\***</mark> - `https://${parameters.domain}/reports/v2/activity`
  * **Query Params**&#x20;
    * **Name** - `from`
    * **Value** - `${temporalWindow.from}`
    * **Name** - `to`
    * **Value** - `${temporalWindow.to}`
    * **Name** - `offset`
    * **Value** - `${pagination.offset}`
    * **Name** - `limit`
    * **Value** - `${pagination.limit}`
* **Output**&#x20;
  * **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](/listeners/labels.md) if needed.
