> For the complete documentation index, see [llms.txt](https://sealights-docs.tricentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sealights-docs.tricentis.com/setup-and-configuration/command-line-interface/upload-critical-list.md).

# Upload a Critical List

Upload a critical list (a CSV of business-critical transactions and programs) to the SeaLights application that a pipeline belongs to.

A critical list is a CSV file that names the executables — transactions, views, and programs — that are business-critical for your application. The `upload critical_list` command sends this file to the SeaLights application that the pipeline is linked to (the pipeline's `--appname`).

The ABAP Agent server reads the file, checks it, and uploads it to SeaLights. The command waits until the server has finished and then reports the number of rows that were uploaded.

{% hint style="info" %}
**Prerequisites:**

* The ABAP Agent server is running (see [Start the ABAP Agent Server](broken://pages/jjXJbDJ9CnFBYzl2NDMP)).
* The agent has a valid SeaLights token (see [Set up the agent](broken://pages/54pGpo5ULmlonbluKqHL)).
* The pipeline exists (see [Create & List Pipelines](broken://pages/edqS0kWLEcXgW4rYb5N5)). The critical list is uploaded to the SeaLights application set as the pipeline's application name.
* The server's service account can read the file. The server, not the command-line program, opens the CSV file.
  {% endhint %}

## Upload a critical list

### `slabapcli upload critical_list`

Uploads a critical-list CSV file for a pipeline. The command exits with code `0` when the upload succeeds and with a non-zero code when it fails.

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Syntax" overflow="wrap" %}

```batch
slabapcli.exe upload critical_list --pipeline <pipeline> --path <file.csv>
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Syntax" overflow="wrap" %}

```powershell
.\slabapcli.exe upload critical_list --pipeline <pipeline> --path <file.csv>
```

{% endcode %}
{% endtab %}
{% endtabs %}

| Parameter    | Short flag | Required | Description                                                                                                                                                             |
| ------------ | ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--pipeline` | —          | Yes      | The name of the pipeline, as shown by `pipeline list`. The critical list is uploaded to the SeaLights application that this pipeline is linked to.                      |
| `--path`     | —          | Yes      | Path to the critical-list CSV file. The file must exist and must have the `.csv` extension. A relative path is resolved against the directory you run the command from. |

## File format

The file must meet all of the following requirements. The server checks them before it uploads anything, so a file that does not meet them is not uploaded.

* The file extension is `.csv`. Any other extension is rejected.
* The file is UTF-8 encoded.
* The first row is the header, and it is exactly `Name,Type` (two columns, in this order, with this capitalization).
* Every data row has exactly two columns: `Name` and `Type`. Both values are required.
* `Type` is one of `TCOD`, `ISVW`, or `PROG`. The value is not case-sensitive (`prog` is accepted), but it must not contain leading or trailing spaces.
* Fields can be enclosed in double quotes, for example when a name contains a comma.
* Blank rows are ignored.
* The file contains at least one data row.

Example file:

```csv
Name,Type
VA01,TCOD
ME21N,TCOD
RSUSR002,PROG
"ZFIORI_ORDERS",ISVW
```

The file is uploaded as it is; the agent does not change its content.

## Example

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe upload critical_list --pipeline "ALM_Demo-S21" --path "C:\data\critical_list.csv"
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe upload critical_list --pipeline 'ALM_Demo-S21' --path 'C:\data\critical_list.csv'
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="Expected output (PowerShell, abbreviated)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe upload critical_list --pipeline 'ALM_Demo-S21' --path 'C:\data\critical_list.csv'
[2026-03-08 11:10:00.101+02:00] [info] Detected Windows version: Windows 11
[2026-03-08 11:10:00.123+02:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
Critical list upload completed successfully for process 'proc-abc123': 4 row(s) imported.
```

{% endcode %}

The row count is the number of data rows in the file, not counting the header and blank rows.

## If the upload fails

When the upload fails, the command prints the reason in red (when the output goes to a terminal) and exits with a non-zero code. The most common failures are:

| Message                                                                      | Cause and fix                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Critical list CSV is invalid or empty.`                                     | The file does not meet the [file format](#file-format) requirements — for example, the header is not exactly `Name,Type`, a row has a missing or extra column, a `Type` value is not `TCOD`, `ISVW`, or `PROG`, or there are no data rows. The [server log](broken://pages/jjXJbDJ9CnFBYzl2NDMP#server-logs) names the first row that failed. |
| `Critical list file was not found.`                                          | The server could not open the file. Check the path, and check that the server's service account can read it.                                                                                                                                                                                                                                  |
| `PIPELINE_NOT_FOUND`                                                         | No pipeline with that name is configured. Run `slabapcli pipeline list` and use the name shown there.                                                                                                                                                                                                                                         |
| `INVALID_REQUEST`                                                            | The server rejected the request, for example because the file does not have the `.csv` extension.                                                                                                                                                                                                                                             |
| `Critical list upload failed during execution. See server logs for details.` | The file was valid, but the upload to SeaLights failed — for example, because the SeaLights token is invalid or SeaLights is unreachable. Check the connection with `slabapcli sealights test` and see the [server log](broken://pages/jjXJbDJ9CnFBYzl2NDMP#server-logs).                                                                     |

The exit code identifies the type of failure, using the same codes as the other server tasks. For example, `12` means the ABAP Agent server is not running, `13` means the pipeline was not found, and `14` means the task itself failed. For the full list, see [Watcher exit codes](broken://pages/JZVVGs3ieGcAwmbZ8qqj#watcher-exit-codes).

Only one critical-list upload can run for a pipeline at a time. If you start a second one while the first is still running, the second command fails with exit code `17`.

If the `--path` file does not exist, the command stops immediately, before it contacts the server.
