Skip to content

Thing

Port: REST :3150 · gRPC :5150

Internet of Things device management and sensor telemetry. Manages physical devices, their measurement channels (sensors), and the time-series readings (metrics) those sensors produce.

Collections

CollectionPathPurpose
Devices/thing/devicesPhysical IoT device or gateway records
Sensors/thing/sensorsMeasurement channels attached to devices
Metrics/thing/metricsTime-series telemetry readings

thing/devices

A physical IoT unit or gateway.

Required Create Fields

FieldRequiredTypeDescription
namestringHuman-readable device name

Optional Fields

FieldTypeDescription
typestringDevice type / category
tokenstringDevice communication token
stateStatePENDING, APPROVED, REJECTED, VERIFIED, UNKNOWN
statusStatusACTIVE, INACTIVE
locationMongoIdRaw logistic/locations ID — not populatable

thing/devices.location is a raw MongoId. To resolve location details, read the ID and query logistic/locations separately.

thing/sensors

A logical measurement channel attached to a device.

Required Create Fields

FieldRequiredTypeDescription
deviceMongoIdParent device ID

Optional Fields

FieldTypeDescription
namestringSensor name
typestringSensor category
unitstringMeasurement unit (e.g. °C, hPa)
metricstringMetric label / key family
stateStateOperational state
statusStatusAdministrative status

Population

PathCollection
devicething/devices

thing/metrics

A telemetry reading produced by a sensor.

Required Create Fields

FieldRequiredTypeDescription
sensorMongoIdSource sensor ID
valuenumber | number[]Scalar or numeric array reading

Optional Fields

FieldTypeDescription
keystringMetric key identifier
stateStateReading state classification
deviceMongoIdDirect device reference for efficient filtering — returned in responses and populatable

thing/metrics.device is included in serializer responses and can be populated directly (populate: [{ path: "device" }]), or you can populate sensor and resolve the device through it.

Population

PathCollection
sensorthing/sensors
devicething/devices

Query Tips

  • Always filter metrics by sensor, device, key, and/or a created_at time range — metric collections grow quickly.
  • Use count before paginating high-frequency metric datasets.
  • Sort recent metrics by created_at: desc.