# Device Configuration

> Manage device metadata, KV entries, logger state, and update workflows.

Device configuration in Infuse-IoT Cloud includes editable metadata, device KV entries, queued KV updates, logger sync state, and application update state.

Use the console for one-off inspection and operational changes. Use the API for automation, bulk updates, and backend-owned workflows.

## Metadata

Metadata is stored as key-value pairs on the device record. It is useful for operational context such as serial number, asset ID, customer, deployment site, hardware variant, or commissioning batch.

From **Infuse IoT** > **Devices**, open a device and select **Metadata**. You can add fields, choose board-defined fields, update values, and save the metadata set.

If the board defines metadata fields:

- required fields must be present,
- unique fields are highlighted as identifiers that should not be reused within that board family,
- fields help operators use consistent names across devices.

## KV Store

KV entries represent device-side configuration or state values. Open a device and select **KV Store** to inspect entries and definitions.

The console can show:

- key ID and key name,
- decoded value when a KV definition is available,
- raw base64 value,
- CRC,
- created and updated timestamps,
- read-only and write-only indicators.

Queue a KV update when you need the device to apply a new value. Use decoded JSON mode when a definition is available. Use raw base64 mode when you need to provide the encoded payload directly.

## KV Update History

Each KV entry can have queued or completed updates. Update history shows status, attempts, last error, last attempt time, and timestamps.

Only one pending update should exist for a KV entry. Cancel the pending update when it is no longer desired.

## Logger Sync

The **Logger Sync** tab shows logger states reported by the device, including:

- logger index,
- last reported block,
- last reported time,
- last downloaded block,
- download enabled state,
- last downloaded time.

Use logger state to troubleshoot whether logged data is moving through the expected sync path.

## API Workflows

<table>
<thead>
  <tr>
    <th>
      Task
    </th>
    
    <th>
      Endpoint
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Update device metadata
    </td>
    
    <td>
      <code>
        PUT /device/id/{id}
      </code>
      
       or platform <code>
        PATCH /iot/devices/{deviceId}/metadata
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      List KV entries
    </td>
    
    <td>
      <code>
        GET /device/deviceId/{deviceId}/kv/entries
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Read one KV entry
    </td>
    
    <td>
      <code>
        GET /device/deviceId/{deviceId}/kv/entries/{keyId}
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      List KV entry updates
    </td>
    
    <td>
      <code>
        GET /device/deviceId/{deviceId}/kv/entries/{keyId}/updates
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Queue a KV update
    </td>
    
    <td>
      <code>
        POST /device/deviceId/{deviceId}/kv/entries/{keyId}/updates
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Cancel a pending KV update
    </td>
    
    <td>
      <code>
        DELETE /device/deviceId/{deviceId}/kv/entries/{keyId}/updates
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      List logger states
    </td>
    
    <td>
      <code>
        GET /device/deviceId/{deviceId}/loggerStates
      </code>
    </td>
  </tr>
</tbody>
</table>

For definitions that drive decoded KV display, see [Definitions](/docs/infuse-iot-cloud/definitions).
