Log In

Overview

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

NameTypeObligatory?Description
namestringYesName of the field.
type.namestringYesType of the field.
type.operators.opstringYesName of the operation.
type.operators.displayNamestringYesDisplayed name of the operation.
hiddenbooleanYesWhether the field is visible or not in MOCA Console.
displayNamestringYesDisplayed name of the field.
indexintegerYesIndex of the fueld, used for sorting.
categorystringYesCategory of the field.
allowFreeInputbooleanYesWhether free input values are allowed for this field.
custombooleanYesWhether 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
}