> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/c/csv-file-web-applications.md).

# CSV File Web Applications

The CSV File Web Applications adapter reads web applications, with their WAF and load balancer settings, from a CSV file on the connector host and adds them to the inventory.

## Use cases

* List imported web applications.

```
Adapters = csv-file-webapps
```

## Before you begin

### Network

| Source         | Destination                                                            | Port | Protocol |
| -------------- | ---------------------------------------------------------------------- | ---- | -------- |
| Not applicable | The file is read from the connector host. No network access is needed. | -    | -        |

### Required permissions

| Scope or role           | Permission | Needed for                                                                       |
| ----------------------- | ---------- | -------------------------------------------------------------------------------- |
| Read access to the file | Read       | The connector process must read the file in `/opt/octoxlabs/connector/media/csv` |

## Create credentials in CSV File Web Applications

This adapter has no credentials. Prepare the file instead.

{% stepper %}
{% step %}

### Create the CSV file

Create a CSV file with a header row. Name the columns with the canonical column names listed in **Fields fetched** so that rows map automatically. Separate multiple values in one cell with the list separator (default `|`).
{% endstep %}

{% step %}

### Copy the file to the connector

Copy the file to `/opt/octoxlabs/connector/media/csv` on the connector host. The connector must be able to read it, so check the file permissions.
{% endstep %}

{% step %}

### Name the file

Enter the file name in the **Filename** parameter. A glob pattern such as `export_*.csv` is allowed. When several files match, the most recently modified file is used.
{% endstep %}

{% step %}

### Write nested columns

Column headers lose their dots, so write nested fields as `Tls.Ssl` (arrives as `TlsSsl`). TLS flags are stored as `enable` or `disable`; `true` and `false` are accepted. WafPosture values are booleans. Backends columns describe one backend per row.
{% endstep %}

{% step %}

### List backend members

List members with the list separator, matched by position, for example `10.0.1.11|10.0.1.12`. A single value applies to every member.
{% endstep %}

{% step %}

### Use boolean columns

**Wildcard**, **HostRestricted**, **Inline** and **MonitorMode** are booleans. `true`/`false`, `yes`/`no` and `enable`/`disable` are accepted. Separate several **ListenerIps**, **ListenerPorts**, **SignatureClasses**, **PolicyRuleIds** and **PolicyTags** with the list separator.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter         | Required | Type               | Default    | Description                                                                                                                   |
| ----------------- | -------- | ------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Filename          | Yes      | Text               |            | Name or glob pattern of the CSV file, relative to `/opt/octoxlabs/connector/media/csv`. Absolute paths and `..` are rejected. |
| Primary Key Field | No       | Text               | PrimaryKey | Name of the column with the unique identifier of each row. Rows without a usable primary key are skipped.                     |
| Separator         | No       | Text (1 character) | ,          | Column separator.                                                                                                             |
| List Separator    | No       | Text (1 character) | \|         | Separator for several values in one cell.                                                                                     |
| Quote Char        | No       | Text (1 character) | "          | Quote character for cell values.                                                                                              |

## Troubleshooting

| Error message                                                                 | Cause                                       | Fix                                                        |
| ----------------------------------------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------- |
| File not found with this pattern.                                             | No file in the CSV folder matches Filename. | Copy the file to the folder and check the name or pattern. |
| No such file.                                                                 | The resolved path is not a file.            | Check Filename.                                            |
| (file name) file is empty.                                                    | The file has no header row.                 | Add a header row.                                          |
| An absolute path is not allowed; give a name relative to the adapter's folder | Filename starts with `/`.                   | Use a relative name.                                       |
| '..' is not allowed; the file must stay inside the adapter's folder           | Filename contains `..`.                     | Use a name inside the CSV folder.                          |

## Change history

{% hint style="info" %}
Available starting from version 6.9.1.
{% endhint %}
