# List events.

Returns a paginated list of events.

Endpoint: POST /events
Version: v3
Security: oauth2

## Security:

  - `oauth2` (unknown)
    oauth2

## Request body:

  - `application/json, text/json, application/*+json` (unknown)
    Cancellation token to cancel the operation.

## Request fields (application/json):

  - `sortSpecifications` (array)

  - `sortSpecifications.field` (string, required)

  - `sortSpecifications.sort` (null | string)

  - `sortSpecifications.isSortDescending` (boolean)

  - `filterSpecifications` (array)

  - `filterSpecifications.field` (string, required)

  - `filterSpecifications.operator` (string, required)

  - `filterSpecifications.value` (any)

  - `filterSpecifications.filterConditionOperator` (any)

  - `page` (null | integer)

  - `pageSize` (null | integer)

## Response 200:

  - `200` (unknown)
    A paginated collection of events that match the specified filter criteria.

## Response 200 fields (text/plain):

  - `before` (integer)

  - `after` (integer)

  - `total` (integer)

  - `items` (array)

  - `items.id` (string)
    Gets the event id which acts as the primary key in the database.

  - `items.name` (null | string, required)
    Gets or sets the event name.

  - `items.description` (null | string)
    Gets or sets the event description.

  - `items.startTime` (string, required)
    Gets or sets the event start time.

  - `items.endTime` (null | string)
    Gets or sets the event end time.

  - `items.eventTypeId` (integer, required)
    Gets the event type id which is defined by Willow, e.g. CalendarEvent, WeatherForecast, UtilityBill, ….

  - `items.type` (integer)
    Gets the strongly-typed event type, or `null` when int Event.EventTypeId does not
correspond to a known EventType.

  - `items.subTypeId` (null | integer)
    Gets or sets the event sub type id, which further qualifies the int Event.EventTypeId.

  - `items.category` (null | integer)
    Gets or sets the event category — the id of a user-defined EventCategory. Independent of
the event type and sub type — any event may carry any category. Null or 0 means "no category". On update,
null preserves the existing category and 0 explicitly clears it, so clients that don't yet send the field
can't clear data they don't know about.

  - `items.eventSourceId` (null | string)
    Gets the name of the source system, which is for informational purposes.

  - `items.externalId` (null | string)
    Gets an Id linking it to the source system, facilitating updates and deletes.

  - `items.payload` (null | string, required)
    Gets or sets a JSON string containing type-specific values.

  - `items.payloadVersion` (null | string, required)
    Gets or sets a version for the payload to assist in the deserialization of the payload.

  - `items.scalarValue` (null | number)
    Gets or sets a double value that may be stored to complement the Payload value.

  - `items.twinId` (null | string, required)
    Gets the id of the twin that is a reference to to an existing space, or equipment twin.

  - `items.locations` (null | string)
    Gets or sets a JSON string with the expanded location ancestors for the twinId.

  - `items.createdDate` (string, required)
    Gets or sets the date the event was created in the system.

  - `items.lastModifiedDate` (string, required)
    Gets or sets the date the event was last modified in the system.

