This resource is part of the asset-centric data model.
- New projects: We recommend using the data modeling service for greater flexibility and performance. Move high-volume alarms, logs, and notifications to records. Move workflow activities to CogniteActivity.
startTime and endTime for the event’s period are represented in Unix Epoch time in milliseconds. CDF doesn’t support fractional milliseconds and doesn’t count leap seconds. You can specify both the start and end times in the future, but the end timestamp must be greater than or equal to the start timestamp for the input to be valid.
To describe and classify events, you can add arbitrary string values for description, metadata, type, and subtype. All event information is stored in string format when you store it in metadata.
Use the Data Modeling service to store manually generated, schedulable activities with low volumes, such as maintenance schedules, work orders, or other appointment-type activities.
Events and time series data are high-volume data types that can record data in microsecond resolutions. Avoid using events as a time series store, especially when the data flow is from a single instance of sensors (temperature, pressure, voltage), simulators, or state machines (on, off, disconnected). The Time Series API provides very low latency read and write performance and specialized filters and aggregations designed to analyze time series data.
What you can do
- Create events with metadata, time ranges, and asset links.
- Search for events by description, metadata, or time range.
- Filter events using advanced criteria.
- Aggregate event data for analytics and reporting.
- Update event properties and asset associations.
- Delete events that are no longer needed.
Advanced filtering
EventadvancedFilter uses the same language as asset advanced filtering. See Filter language.
Event-specific limits:
- Metadata filters are case-insensitive and accept keys and values up to 256 characters.
- A metadata
rangefilter must set both an upper and a lower bound. - Maximum string lengths include
type64 andsubtype64.
Sorting
Null handling and_score_ sorting match asset sorting.
Aggregates
Aggregate computes counts and grouped values over events.filter and advancedFilter select the events. aggregateFilter filters the resulting buckets.
Update events
Update is partial. Omitted fields stay unchanged. One request updates at most 1000 events, and each event ID must be unique. For a string or number,set writes the value and setNull clears it. For an array such as assetIds, set replaces the list, add appends values, and remove drops values that are present.