Official Plugins (Kuzzle v2.x)
Device Manager v1.x
2

This plugin is part of the Kuzzle Enterprise Plan. If you are interested, please contact us.

registerMetadata #

Add properties definition to the metadata field of the devices collection.

Copied to clipboard!
registerMetadata (mapping: JSONObject, options: JSONObject);

Arguments Type Description
mapping
JSONObject
Mapping definiton of the metadata property
options
JSONObject
Additional options

options #

Properties Type Description
tenantGroup
string
Name of the group for which the mapping should apply. If unspecified, mappings will apply to every group who does not have specific definition.

Usage #

Copied to clipboard!
import { DeviceManagerPlugin } from 'kuzzle-plugin-device-manager';

const deviceManagerPlugin = new DeviceManagerPlugin();

deviceManagerPlugin.devices.registerMetadata({
    serial: {
    type: 'keyword',
    fields: {
      text: { type: 'text' } }
  }
}, { tenantGroup: 'water_management' });