> 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/the-workspace/listeners/listener-integrations/pull-data-from-http-endpoints/collect-data-from-arista-cloudvision.md).

# Collect data from Arista CloudVision

## Overview

Get a list of Arista CloudVision audit events through the [CloudVision REST API](https://www.arista.io/help/articles/settings-audit-logs-rest-api) 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** - `cvp`
* **Value** - Enter your CloudVision Portal domain name.

### Secrets

You must define these credentials in Onum:

* `token` will reference your CloudVision token.

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

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/administration/global-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: false
withEnumerationPhase: false
collectionPhase:
  paginationType: "cursor"
  cursorSelector: .data[-1]
  initialRequest:
    responseType: json
    method: "POST"
    url: "https://${parameters.cvp}/cvpservice/audit/getLogs.do"
    headers:
      - name: Authorization
        value: Bearer ${secrets.token}
      - name: Content-Type
        value: application/json
      - name: Accept
        value: application/json
    bodyType: raw
    bodyRaw: |
      {
        "category": "USER",
        "startTime": ${temporalWindow.from},
        "endTime": ${temporalWindow.to},
        "dataSize": 1000,
        "objetKey": "admin"
      }
  nextRequest:
    responseType: json
    method: "POST"
    url: "https://${parameters.cvp}/cvpservice/audit/getLogs.do"
    headers:
      - name: Authorization
        value: Bearer ${secrets.token}
      - name: Content-Type
        value: application/json
      - name: Accept
        value: application/json
    bodyType: raw
    bodyRaw: |
      {
        "category": "USER",
        "startTime": ${temporalWindow.from},
        "endTime": ${temporalWindow.to},
        "dataSize": 1000,
        "objetKey": "admin",
        "lastRetrievedAudit": ${pagination.cursor}
      }
  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** - `5m`
* **Offset** - `5m`
* **Format** - `Epoch`

**Collection Phase**

* **Pagination Type**<mark style="color:red;">**\***</mark> - `Cursor`
* **Cursor Selector**<mark style="color:red;">**\***</mark> - `.data[-1]`
* **Initial Request**&#x20;
  * **Response Type**<mark style="color:$primary;">**\***</mark> - `JSON`
  * **Method**<mark style="color:red;">**\***</mark> - `POST`
  * **URL**<mark style="color:red;">**\***</mark> - `https://${parameters.cvp}/cvpservice/audit/getLogs.do`
  * **Headers**&#x20;
    * **Name** - `Authorization`&#x20;
    * **Value** - `Bearer ${secrets.token}`&#x20;
    * **Name** - `Content-Type`
    * **Value** - `application/json`&#x20;
    * **Name** - `Accept`
    * **Value** - `application/json`&#x20;
  * **Body Type**<mark style="color:red;">**\***</mark> - `Raw`
  * **Body Content**<mark style="color:red;">**\***</mark> -&#x20;

```
{
  "category": "USER",
  "startTime": ${temporalWindow.from},
  "endTime": ${temporalWindow.to},
  "dataSize": 1000,
  "objetKey": "admin"
}
```

* **Next Request**
  * **Response Type**<mark style="color:$primary;">**\***</mark> - `JSON`
  * **Method**<mark style="color:red;">**\***</mark> - `POST`
  * **URL**<mark style="color:red;">**\***</mark> - `https://${parameters.cvp}/cvpservice/audit/getLogs.do`
  * **Headers**&#x20;
    * **Name** - `Authorization`&#x20;
    * **Value** - `Bearer ${secrets.token}`
    * **Name** - `Content-Type`
    * **Value** - `application/json`&#x20;
    * **Name** - `Accept`
    * **Value** - `application/json`
* **Body Type**<mark style="color:red;">**\***</mark> - `Raw`
* **Body Content**<mark style="color:red;">**\***</mark> -

```
{
  "category": "USER",
  "startTime": ${temporalWindow.from},
  "endTime": ${temporalWindow.to},
  "dataSize": 1000,
  "objetKey": "admin",
  "lastRetrievedAudit": ${pagination.cursor}
}
```

* **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](/the-workspace/listeners/labels.md) if needed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onum.com/the-workspace/listeners/listener-integrations/pull-data-from-http-endpoints/collect-data-from-arista-cloudvision.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
