Asset-centric API, deprecated 2026-10-15 and retired 2027-12-31. Will be removed or moved in a future major release. See https://docs.cognite.com/cdf/deprecated and https://github.com/cognitedata/cognite-sdk-js/blob/master/guides/DEPRECATIONS.md.

Hierarchy

Constructors

Accessors

  • get aggregate(): EventsAggregateAPI
  • The aggregation API allows you to compute aggregated results on events like getting the count of all events in a project or checking what are all the different types and subtypes of events in your project, along with the count of events in each of those aggregations. By specifying an additional filter, you can also aggregate only among events matching the specified filter.

    Returns EventsAggregateAPI

Methods

  • Create events

    const events = [
    { description: 'Workorder pump abc', startTime: new Date('22 jan 2019') },
    { description: 'Broken rule', externalId: 'rule123', startTime: 1557346524667000 },
    ];
    const createdEvents = await client.events.create(events);

    Parameters

    Returns Promise<CogniteEvent[]>

    Asset-centric API, deprecated 2026-10-15 and retired 2027-12-31. Will be removed or moved in a future major release.