---
updatedAt: 2025-09-12T09:31:09.000Z
agentTools:
  projectIndex: https://dev.edgeiq.io/llms.txt
---

# Storing User-Defined Data - Device Metadata

Use Device Metadata to store additional device information and enable business centric workflows.

Using metadata on devices allows you to extend EdgeIQ's core device management features to match your specific use case. You can store additional data as metadata and refer to it from within workflows, policies, commands, and more via templating. Additionally, specific metadata fields can be highlighted using the **Important Metadata** feature to be displayed prominently in the UI.

# Device Metadata

Device metadata allows flexibility in associating user-defined data with individual devices.

## Key Features

* **Storage Scope**: Metadata is stored at the individual device level, making it unique to each device.
* **Custom Key-Value Pairs**: Users can define custom key-value pairs. This allows for dynamic data storage tailored to specific device needs. Data is stored as strings and can be accessed and converted with workflows as needed.
* **Integration with Workflows**: Device metadata can be accessed and referenced in workflows. This enables automation and custom behavior based on metadata values.
* **Integration with Templating Engine**: The templating engine has access to metadata fields to use metadata for policies and commands.
* **Management Options** Metadata can be added, updated, and deleted via both the User Interface (UI) and API, offering flexibility in how it is managed.

## Adding Device Metadata

You can add, update, and remove **Device Metadata** through the UI via the **Metadata** device tab:

<Image alt="Updating Device Metadata on the Device Details Page" align="center" src="https://files.readme.io/3094920d334131131aa623c1bd3af3cee23e32164294a0460c75c447bfb64857-Screenshot_2025-01-03_at_16.23.22.png">
  Updating Device Metadata on the Device Details Page
</Image>

Device Metadata is also accessible through the API, for more details refer to [Create Device API](https://dev.edgeiq.io/reference/post_devices) and [Device Metadata API description](https://dev.edgeiq.io/docs/device-metadata) for how metadata is provided as a JSON object through the API. See [Bulk CSV Upload](https://dev.edgeiq.io/docs/bulk-device-creation#csv-upload) as an example for setting metadata through bulk CSV uploads.

## Using Metadata in Templates

To use metadata in templates, you can refer to it via the following syntax:

```
{{ .metadata.<field_name> }}
```

This can be used with any commands and translators that support templating.

## Using Metadata in Workflows

Metadata can be accessed in workflows using the **read device metadata** and **write device metadata** nodes. In the example below, the **device metadata** is read every time a report is received, and a call to an external API is enriched with this metadata.

<Image alt="Workflow using the **read device metadata** node." align="center" src="https://files.readme.io/74b87477fcb231ae32951ea0e640a9aeb263ec708c136302582ef4098cb35e60-Screenshot_2025-01-03_at_18.16.06.png">
  Workflow using the **read device metadata** node.
</Image>

Within the configuration of the **API POST** request, the metadata fields can be accessed using `msg.metadata.<field_name>`, `firmware_revision` in this example:

<Image alt="Accessing device metadata in workflows" align="center" src="https://files.readme.io/3e224b4cdd7fda791d9097e89ec07f5c2371c482fb793bc863baf6b97c5f4ccc-Screenshot_2025-01-03_at_18.19.08.png">
  Referring to device metadata in other workflow nodes
</Image>

# Important Metadata

To display specific metadata fields prominently on the **Device Details** page, you can use **Important Metadata**. **Important Metadata** is defined on the **Device Profile** level and applies to all devices of the same type.

## Key Features

* **Storage Scope:** Stored at the device profile level, ensuring consistency across all devices of the same type.
* **Highlight Key Information:** Marked fields appear prominently on the main device page for all devices of the corresponding profile type. This enables users to highlight a subset of metadata while keeping less critical metadata accessible under the Metadata tab on the device details page.
* **Human-Friendly Labels:** Metadata keys can be assigned user-friendly labels for better readability (e.g., `firmware_revision` can be labeled as `Firmware Revision`)
* **Customization & Ordering:** Drag-and-drop functionality allows users to reorder important metadata, ensuring the most critical information is displayed first.
* **Enhanced Visibility:** Important metadata is particularly useful for filtering and providing a quick overview of the most critical data points in the UI.

## Set Important Metadata Fields

To mark metadata fields as important, navigate to the **Device Profile** page (from the left-side menu, select **Devices > Device Profiles**).

Navigate to the **Important Metadata** section:

<Image alt="Important Metadata can be set on the device profile" align="center" src="https://files.readme.io/f7312285f4a207306e931dcbee781cbb535f8698b2d9a2ce75d9a1c77bd032e4-Screenshot_2025-01-03_at_16.23.57.png">
  Important Metadata can be set on the device profile
</Image>

Add the fields (`Keys`) you want to highlight as important metadata:

<Image alt="Add important metadata fields" align="center" src="https://files.readme.io/a78553597525f566a69c8588d7c3596d20951c5d3e6b8967fbf4b75d1f165504-Screenshot_2025-01-03_at_16.41.41.png">
  Add important metadata fields
</Image>

You can reorder fields via drag\&drop:

<Image alt="Ordering important metadata via drag&drop" align="center" src="https://files.readme.io/da3e136bbc6d627bd12b387df63a320cee5b32f9a33d6d888a65a25ccf6ba156-Screen_Recording_2025-01-03_at_18.42.22.gif">
  Ordering important metadata via drag\&drop
</Image>

## Displaying Important Metadata

Navigating back to the **Device Details** page, you can now see the highlighted metadata on the first screen:

<Image alt="Important Metadata is displayed on the first Device Details page" align="center" src="https://files.readme.io/b354785b84574c7ebce8e2330f81a351d4fc7b89129ceceb12aec088f94c2bbf-Screenshot_2025-01-03_at_18.47.12.png">
  Important Metadata is displayed on the first Device Details page
</Image>