> 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-armis-centrix-api.md).

# Pull data from the Armis Centrix API

## Overview

Get a list of Armis Centrix audit events through the [Armis Centrix API](https://docs.query.ai/docs/armis-centrix) using the **HTTP Pull** Listener.

## 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 Armis instance name.

### Secrets

You must define these credentials in Onum:

* `armis_key` will reference your Armis API key.

To do it, click **Add element** and enter a **Name** for the secret (in this case, `armis_key`). 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.&#x20;

{% 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: "2006-01-02T15:04:05"
withAuthentication: true
authentication:
  type: token
  token:
    request:
      method: POST
      url: ${parameters.domain}/api/v1/access_token/
      headers:
        - name: Content-Type
          value: application/x-www-form-urlencoded
        - name: Accept
          value: application/json
      bodyType: urlEncoded
      bodyParams:
        - name: secret_key
          value: ${secrets.armis_key}
    tokenPath: ".data.access_token"
    authInjection:
      in: header
      name: Authorization
      prefix: ''
      suffix: ''
withEnumerationPhase: false
collectionPhase:
  paginationType: offsetLimit
  isZeroIndex: false
  limit: 200
  request:
    responseType: json
    method: GET
    url: ${parameters.domain}/api/v1/search/
    queryParams:
      - name: aql
        value: in:alerts after:${temporalWindow.from} before:${temporalWindow.to}
      - name: from
        value: ${pagination.offset}
      - name: length
        value: ${pagination.limit}
  output:
    select: ".data.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** - `5m`
* **Offset** - `5m`
* **Format** - `RFC3339`

**Authentication**

Toggle **ON** and configure these parameters:

* **Type**<mark style="color:$primary;">**\***</mark> - `Token`

**Token Retrieve Based Authentication**

* **Request**
  * **Method**<mark style="color:$primary;">**\***</mark> - `POST`
  * **URL**<mark style="color:$primary;">**\***</mark> - `${parameters.domain}/api/v1/access_token/`
* **Headers**
  * **Name** - `Content-Type`
  * **Value** - `application/x-www-form-urlencoded`
  * **Name** - `Accept`
  * **Value** - `application/json`
* **Body Type**<mark style="color:$primary;">**\***</mark>**&#x20;-** `URLEncoded`
* **Body Params**
  * **Name** - `secret_key`
  * **Value** - `${secrets.armis_key}`
* **Token path**<mark style="color:$primary;">**\***</mark> - `.data.access_token`
* **Auth Injection**
  * **In**<mark style="color:$primary;">**\***</mark> - `Header`
  * **Name**<mark style="color:$primary;">**\***</mark> - `Authorization`
  * **Prefix** - `''`
  * **Suffix** - `''`

**Collection Phase**

* **Pagination Type**<mark style="color:red;">**\***</mark> - `Offset/Limit`
* **Zero Index**<mark style="color:$primary;">**\***</mark> - `false`
* **Limit**<mark style="color:$primary;">**\***</mark> - `200`
* **Request**
  * **Response Type**<mark style="color:$primary;">**\***</mark> - `JSON`
  * **Method**<mark style="color:$primary;">**\***</mark> - `GET`
  * **URL**<mark style="color:$primary;">**\***</mark> - `${parameters.domain}/api/v1/search/`
  * **Query Params**
    * **Name** - `aql`
    * **Value** - `in:alerts after:${temporalWindow.from} before:${temporalWindow.to}`
    * **Name** - `from`
    * **Value** - `${pagination.offset}`
    * **Name** - `length`
    * **Value** - `${pagination.limit}`

**Output**

* **Select**<mark style="color:$primary;">**\***</mark> - `.data.results`
* **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://docs.onum.com/the-workspace/listeners/labels) if needed.
