Schema API

A schema defines the structure and a collection of events. The attributes of the schema describe all the fields that are available on the events in that schema. When creating a schema or an event, it is not required that all fields be defined in the schema - they will be automatically added. However, once created, the datatype of fields cannot be changed.

Attributes

Up to 256 attributes can be defined and attribute names must be between 3 and 255 characters long, and can contain only the following characters:

  • a-z

  • A-Z

  • 0-9

  • _ (underscore)

  • - (dash)

  • . (dot)

In the attributes object you must define the field name as the key and the data type as the value. The following datatypes are accepted:

  • bool

  • number

  • integer

  • string

  • blob

  • json

  • timestamp

Special Attributes

The following attribute names must have the specified data type. These attributes can be utilized by LiveReach to connect your events with other LiveReach resources.

Attribute Name
Data Type

timestamp

timestamp

lr.name

string

lr.camera_id

string

lr.nvr_id

string

lr.user_id

number

lr.location_id

number

lr.duration

number

lr.case_id

string

Reserved Attributes

The following names cannot be used as attributes:

  • id

  • timestamp_nanos

  • schema_id

  • schema_name

  • created

  • updated

The Schema object

Attributes

User‑defined table definition

namestringRequired
organization_idintegerRequiredDefault: 0
internalbooleanOptionalDefault: falseExample: false
createdstring · date-time · nullableRead-onlyOptional
updatedstring · date-time · nullableRead-onlyOptional

The Schema object

Last updated