Events and entities contains attributes represented as key-value pairs. The value can be a single (scalar) value (eg a string, integer, date), or a nested structure like an array or an object.
When queried, attributes become fields. A field is similar to a column in a table in a relational database. The mapping for each field has a field type (not to be confused with event or entity type) which indicates the type of data that can be stored in that field, eg integer, string, object.
The Field Object
Name | Type | Obligatory? | Description |
---|---|---|---|
name | string | Yes | Name of the field. |
type.name | string | Yes | Type of the field. |
type.operators.op | string | Yes | Name of the operation. |
type.operators.displayName | string | Yes | Displayed name of the operation. |
hidden | boolean | Yes | Whether the field is visible or not in MOCA Console. |
displayName | string | Yes | Displayed name of the field. |
index | integer | Yes | Index of the fueld, used for sorting. |
category | string | Yes | Category of the field. |
allowFreeInput | boolean | Yes | Whether free input values are allowed for this field. |
custom | boolean | Yes | Whether this field is custom. |
{
"name": "lang",
"type": {
"name": "string",
"operators": [
{
"op": "eq",
"displayName": "is equal to"
},
{
"op": "ne",
"displayName": "is not equal to"
},
{...}
]
},
"hidden": false,
"displayName": "Language",
"index": 0,
"category": "user",
"allowFreeInput": false,
"custom": false
}