> For the complete documentation index, see [llms.txt](https://docs.primeur.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.primeur.com/panorama-2.0.1/setup-and-configuration/plugins-configuration/external.md).

# External

The **External plugin** allows Panorama cards to be displayed **outside the Panorama application** using **OTP (One‑Time Password) authentication**.

A typical use case is embedding a Panorama card into an external application, such as a **corporate portal**, by using an HTML `iframe`.

## How the External plugin works

The **External plugin** enables secure external access to Panorama cards through the following mechanism:

1. A Panorama user requests an **OTP token** using authenticated API access.
2. The OTP is appended to the External Card URL.
3. The card is rendered externally (for example, inside an `iframe`).

## External plugin configuration

The External plugin is configured from the **Setup** → **Plugins** → **External** section in Panorama.

The **External** configuration window contains the following fields:

* **User authentication (\*)**: select the **internal Panorama user** that is authorized to use the External plugin to make requests from outside Panorama and view cards externally. Requirements:
  * The user must exist in Panorama.
  * The user must have at least **basic read permissions.**
  * The default **Guest** role is suitable and was specifically created for External usage (read‑only access).
  * This user must be allowed to authenticate External API calls.
* **OTP minutes timeout (\*)**: specifies the **validity period (in minutes)** of the generated OTP.
  * This value defines **how long the authorization remains valid to configure and render a card outside Panorama**. The time configured here represents the amount of time available to complete the external rendering operation (for example, configuring the `iframe`). It does not define how long the card remains visible once rendered.
  * Example: if set to `10`, the OTP is valid for **10 minutes** from the time it is generated.

### OTP generation (overview)

To generate an OTP:

1. Use the credentials of the **internal Panorama user** configured in the **User authentication** field.
2. Encode the credentials using **Base64** in the following format:

```
username:password
```

3. Perform a **GET request** to Panorama’s authentication API endpoint, including an `Authorization` header using **Basic authentication**.

{% code overflow="wrap" %}

```
https://<panorama_address:port>/reporting/plugin/external/authenticate
```

{% endcode %}

The API returns an **OTP token**, which is valid for the duration specified in the **OTP minutes timeout** field. The OTP token must be appended to the **External Card URL**.

{% hint style="info" %}
The detailed OTP request procedure is not documented here, as it is assumed the user is already familiar with these concepts.
{% endhint %}

### External card URL format

External cards are accessed using the following URL structure:

```
/external/card/{type}/category/{category}/range/{range}/from/{from}/otp/{OTP}
```

#### URL parameters

**`{type}` – Card type**

The type of card to render. Supported values are:

{% code overflow="wrap" %}

```
// STATS
SIZE_CARD                      (FLOW, TRANSFER)
TRANSFERRED_CARD               (FLOW, TRANSFER)
TIME_CARD                      (FLOW, TRANSFER)
STATUS_CARD                    (FLOW, TRANSFER)
PERIOD_CARD                    (FLOW, TRANSFER)
PROGRESS_CARD                  (FLOW)
PROTOCOLS_COMPARATOR_CARD      (TRANSFER)
TRANSFERS_FOR_PROTOCOL_CARD    (TRANSFER)
BYTE_FOR_PROTOCOL_CARD         (TRANSFER)
BYTE_FOR_SOURCE_CARD           (FLOW)
PROTOCOL_INPUT_OUTPUT_CARD     (TRANSFER)

// SPAZIO
SPAZIO_QUEUE_CARD              (SPAZIO)

// DATAONE
DATAONE_CONTRACTS_CARD         (DATAONE)
DATAONE_ACTORS_CARD            (DATAONE)
DATAONE_ACTORS_COMPARATOR_CARD (DATAONE)
DATAONE_CONTRACTS_COMPARATOR_CARD (DATAONE)
```

{% endcode %}

**`{category}` – Data category**

Allowed values:

{% code overflow="wrap" %}

```
FLOW
TRANSFER
SPAZIO
DATAONE
```

{% endcode %}

**`{range}` – Time range**

Allowed values:

{% code overflow="wrap" %}

```
DAILY
WEEKLY
MONTHLY
YEARLY
```

{% endcode %}

**`{from}` – Start date**

Defines the starting date for the card data.

Allowed values:

* A specific date formatted as `yyyy-mm-dd`
* `current` (uses the current date)

### Examples

#### Example External Card URLs

To configure the **Transfers Bytes for protocol** card of the **current year**, use the following URL:

{% code overflow="wrap" %}

```
/external/card/BYTE_FOR_PROTOCOL_CARD/category/TRANSFER/range/YEARLY/from/current/otp/{OTP}
```

{% endcode %}

To configure the **Flows Status** card for **the current day**, use the following URL:

{% code overflow="wrap" %}

```
/external/card/STATUS_CARD/category/FLOW/range/DAILY/from/current/otp/{OTP}
```

{% endcode %}

#### Example iframe embedding

{% code overflow="wrap" %}

```
<iframe
src="https://<panorama_address:port>/panorama/external/card/BYTE_FOR_PROTOCOL_CARD/category/TRANSFER/range/YEARLY/from/current/otp/2dabc7ca-d37f-4622-b694-530a6aebb7ef"
  style="width: 1000px; height: 600px;">
</iframe>
```

{% endcode %}

### Notes

* Once embedded in an external website or portal, the card remains visible externally but is **not updated in real time**. The data shown corresponds to the state of the card at the moment it was created.
* The **OTP can be used only once**, within the timeout configured.&#x20;
* The **OTP minutes timeout** represents the amount of time available to complete the external configuration process (for example, generating and embedding the `iframe`). **It does not define how long the card remains visible once rendered**. Once the card has been successfully rendered externally, it remains visible even after the OTP expires.
