Property class
Property classes are a set of pre-defined parameters that describe how a property of that class should be displayed, and what values it should accept.
Model
Field | Type | Description |
---|---|---|
name |
String |
Name of the property class. |
description |
String |
Description of the property class. |
value_type_id |
String |
ID of the value type this property class uses. |
value |
Object |
Default value of the property. |
multiple |
Boolean |
Whether this property class has multiple values per key. |
source |
String |
ID of the dictionary used as the source of the values for |
mask |
String |
Filter for the acceptable value that is defined with a regular expression. |
system |
Boolean |
Whether this is a built-in property class. |
id |
String |
ID of the property class. |
multiple_separator |
String |
String that separates multiple values when displayed in the web interface. |
value_display_template |
String |
Template used when displaying values in a web interface. You can use Dictionaries use the following indexing – you can access the key with |
Value types
Value types are defined in the system the following way:
{
{
"id": "ip",
"name": "IP",
"mask": "ip",
"system": true
},
{
"id": "mac",
"name": "MAC",
"mask": {
"regex": "[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2}",
"system": true
}
},
...
}
Field | Description |
---|---|
id |
ID of the value type. |
name |
Name of the value type, displayed in the interface. |
mask |
Regular expression that filters the property’s value. |
system |
Whether this is a built-in type. |
You can get all value types in the system with the Get All Property Value Types. request.
The table below lists all built-in value types, that you can use in property classes.
When you change property model’s value type, specific configuration for the previous value type remains in its respective fields (for example, the mask property for string type).
|
ID | Description |
---|---|
|
Value type that stores a single boolean value. |
|
Value type that stores date as a Unix timestamp (in milliseconds). The system discards the time and only uses the date data stored in a timestamp. You can find out more in this property value type in the Date value type section. |
|
Value type that stores date and time as a Unix timestamp (in milliseconds). |
|
Value type that stores a string with an email. Note that this class is used only in the web interface, the server doesn’t perform any validation of the value set via REST API. |
|
Value type that stores a single floating-point value. |
|
Value type that stores a string with an IP address. Note that this class is used only in the web interface, the server doesn’t perform any validation of the value set via REST API. |
|
Value type that stores a single integer number. |
|
Value type that stores a string with a MAC address. Note that this class is used only in the web interface, the server doesn’t perform any validation of the value set via REST API. |
|
Value type that stores a string with an phone number. Note that this class is used only in the web interface, the server doesn’t perform any validation of the value set via REST API. |
|
Value type that stores a single string. Uses a |
|
Value type that stores time as a Unix timestamp (in milliseconds). The system discards the date and only uses the time data stored in a timestamp. |
|
Value type that stores a string with a URL. Note that this class is used only in the web interface, the server doesn’t perform any validation of the value set via REST API. |
|
Value type that uses a dictionary. Stores the current value as an array of selected keys in the |
Date value type
For the date
value type, the system performs the following actions with the data.
The time component stored in the timestamp value is set to zero (00:00:00.000). Time is offset in such a way, that the date in the timestamp would have the same value regardless of time zones:
-
The system adds +11 hours for timezones from
UTC-11
toUTC+12
; -
The system adds +12 hours for
UTC-12
; -
The system doesn’t change values for
UTC+13
andUTC+14
.
For example:
-
01 September 2024 07:00:00
UTC-05
, timestamp:1725188400000
-
01 September 2024 14:00:00
UTC+03
, timestamp:1725188400000
In this example, the date 01.09.2024 has the same timestamp (1725188400000
) in different time zones (UTC-5
and UTC+3
).
This way, for most time zones the timestamps would be the same. Exceptions to this rule would be UTC-12
, UTC+13
and UTC+14
.