Business Objects ID
Introduction
This document outlines the requirements and constraints for the "id" field used within ThingsHub for business objects such as assets.
If you are importing data from an external system, ensure that your IDs adhere to these guidelines for compatibility and proper functionality within ThingsHub.
ID Field Constraints
The "id" field must adhere to the following rules:
Non-Empty: The field cannot be left blank or empty. An ID value is mandatory for all objects.
Character Set: The ID can only contain alphanumeric characters (a-z, A-Z, 0-9) and hyphens (-).
Length Constraint: The maximum length of the ID can be 63 characters.
Format:
The ID must start and end with an alphanumeric character.
The ID can contain hyphens (-) within the string, but not at the beginning or end.
The ID can only contain alphanumeric characters and hyphens (-). No other special character is permitted.
Uniqueness:
IDs for a particular resource should always be unique. i.e. no two devices can have the same ID.
The uniqueness for the IDs is case-sensitive. i.e.
My-Car
andmy-car
are treated as different IDs.
The thingsHub system ensures that these constraints are satisfied for all thingsHub-generated IDs.
Purpose
These constraints ensure that your IDs maintain:
Uniqueness of objects within the ThingsHub platform.
Compatibility with the thingsHub API and thingsHub system requirements.
Consistency and ease of management.
Notes for API Users
When creating or updating objects via the ThingsHub API, or importing data from an external system, please ensure that your IDs adhere to these guidelines for compatibility and proper functionality within ThingsHub.
Examples
Valid IDs:
crane-123
load-carrier-abc
SmartMakersAsset
microscope-box-42
asset-Data-01
Invalid IDs:
-temperature-sensor-123
(starts with a hyphen)load-carrier-asset-123-
(ends with a hyphen)invalid--123
(double dashes)constru\ctioncrane&&123
(unsupported special characters)this-is-a-very-long-id-that-exceeds-the-maximum-length-of-63-characters
(too long)