# Storage Views

### Overview

**Storage Views** allow you to create and manage multiple **time series data views** per device, enabling structured data storage beyond the default **Time Series Storage**.  This feature is particularly useful for separating different types of data streams within a single device.

Storage Views function as **abstracted tables** (similar to creating separate tables in a database) where data can be published separately, rather than storing everything in the default time series storage.

<figure><img src="https://3109056034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfQfo4zX1x0hfOimS9E2u%2Fuploads%2FxdWna47twkMJu7Tnmbqf%2FCleanShot%202025-03-03%20at%2022.01.12.gif?alt=media&#x26;token=45158f94-d82f-4100-a3b6-2f766b1c6483" alt=""><figcaption></figcaption></figure>

### Core Features

* **Multi-view Storage** – Store and organize different datasets for the same device.
* **Custom Retention Periods** – Define different retention settings per Storage View.
* **Project-based View Allocation** – Once connected, all devices in the project automatically inherit the Storage View.
* **Dynamic Data Routing** – Control where data is stored using a **storage router ID**.

### Creating a Storage View

Storage Views can be created from the **Add-ons** page under **Organization Settings**. This feature is available exclusively for **Enterprise plan organizations**.

1. Navigate to **Organization Settings** > **Add-ons**.
2. Enable **Storage Views** if not already activated.
3. Click **Configure** to manage Storage Views.
4. Click **Create Storage View**, then provide:
   * **Name** (e.g., "Device Logs")
   * **Description** (optional)
   * **Retention Period** (choose from available durations)
5. Click **Create**, and the Storage View will be generated.

Once created, a **Storage View must be linked to a project** to make it accessible.

<figure><img src="https://3109056034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfQfo4zX1x0hfOimS9E2u%2Fuploads%2Fw1DS9ig9PMQVFknFsBGG%2FCleanShot%202025-03-03%20at%2021.59.56%402x.png?alt=media&#x26;token=0e992ba4-0b66-410c-bebd-1978dde449d9" alt=""><figcaption></figcaption></figure>

### Connecting Storage View to a Project

To make the Storage View available for devices within a project:

1. Navigate to the **Storage View configuration page**.
2. Click **Connect Project**.
3. Select the desired project and confirm.

Once linked, every device within that project will have the new **Storage View tab** available under the **Storage page**.

### Publishing Data to a Storage View

To publish data into a specific **Storage View**, include the unique **Storage Router ID** (<mark style="background-color:yellow;">**qb\_storage\_router\_id**</mark>) in the payload.

Each **Storage View** has a unique `qb_storage_router_id`, which must be provided within the incoming data payload.

#### Example Payload:

```json
{
  "qb_storage_router_id": "QB_XYZCE",
  "humidity": 65.58,
  "lightIntensity": 68.16,
  "batteryLevel": 57.46
}
```

{% hint style="warning" %}
If `qb_storage_router_id` is **not** provided, the data will be stored in the **default Time Series Storage.**
{% endhint %}

### Retention Periods

Each Storage View has its own **retention period**, which is set during creation. Unlike default device-level storage, different Storage Views can have **custom retention settings**.

For example:

* **Default Time Series Storage**: 30 days
* **Custom Storage View** (e.g., Device Logs): 15 days

This allows organizations to **optimize data storage** based on business needs.

### Data Size Limits

* The same per-device storage limits apply as in **Time Series Storage**.
* **Enterprise organizations** can define data limits per view.
* The default limit per data point is **customizable** based on agreements.

### Accessing Storage View Data

Data stored in a Storage View can be accessed via:

#### **Storage tab** under each device

<figure><img src="https://3109056034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfQfo4zX1x0hfOimS9E2u%2Fuploads%2FnfqXEky3zYKKQKZsD4Zx%2FCleanShot%202025-03-03%20at%2022.04.21%402x.png?alt=media&#x26;token=30ce6541-080b-4d1d-ba13-8b53261d4e43" alt=""><figcaption></figcaption></figure>

#### **Dashboards & widgets** (for visualization)

<figure><img src="https://3109056034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfQfo4zX1x0hfOimS9E2u%2Fuploads%2FvLDyVnITYVmFYlhmqVRJ%2FCleanShot%202025-03-03%20at%2022.05.41%402x.png?alt=media&#x26;token=fe513e20-4544-48fd-bdb6-c763a67095ca" alt=""><figcaption></figcaption></figure>

### Deleting a Storage View

To delete a Storage View:

1. Navigate to **Storage Views configuration**.
2. Locate the Storage View you want to remove.
3. Click **Delete** to remove it permanently.

{% hint style="danger" %}
Deleting a Storage View **removes all data stored in it** and cannot be undone.
{% endhint %}
