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

registerMetadata #

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

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

Arguments Type Description
mappings
JSONObject
Mappings definiton of the metadata property
options
JSONObject
Additional options

options #

Properties Type Description
group
string
Name of the group for which the mappings 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.assets.registerMetadata({
    serial: {
    type: 'keyword',
    fields: {
      text: { type: 'text' } }
  }
}, { group: 'water_management' });