Skip to main content
Version: 1.17.1

Events

Get events

Query events is used to get a list of events received from OMNI Agent. This query is available at http://$DOMAIN/event-service/graphql.

{ events() { }}

To complete the query, specify the authorization key from OMNI Platform web interface in Headers.

Input parameters:

filters:

  • id:

    • exact:
      • Event identifier
      • Data type: ID
  • type:

    • exact:
      • Event type: IDENTIFICATION, NON_IDENTIFICATION, HAR, ROI, CROSSING
  • date:

    • exact:
      • Event date
      • Data format: ISO 8601
    • gt:
      • Events that happened after this date
      • Data format: ISO 8601
    • gte:
      • Events that happened on or after a given date
      • Data format: ISO 8601
    • lt
      • Events that happened before this date
      • Data format: ISO 8601
    • lte
      • Events that happened on or before a given date
      • Data format: ISO 8601
  • dataIdentificationDataProfileId:

    • exact:
      • Profile identifier
      • Data type: ID
  • activityId:

    • exact:
      • Идентификатор активности
      • Тип данных: ID

order:

  • date (Sorting a list of events by date):

    • ASC: from earliest to latest
    • DESC: from latest to earliest
  • pagination:

    • offset
      • The parameter allows to remove the first n activities from the list.
      • Data type: Int.
    • limit
      • The parameter allows to get the first n activities from the list.
      • Data type: Int.

Output parameters:

  • totalCount
    • Total number of events found
    • Data type: Int.
  • collectionItems: EventOutput:
    • id
      • Event identifier
      • Data type: ID.
    • creationDate
      • Event creation date
      • Data format: ISO 8601.
    • lastModified
      • Last modification date
      • Data format: ISO 8601.
    • data
      • Event data such as identifier of face crop ID and identifier of full frame
      • Data format: JSON.
    • agentId
      • Identifier of the agent that sent an event
      • Data type: ID.
    • cameraId
      • Identifier of the camera linked to an agent that sent an event
      • Data type: ID.
    • type
      • Event type: IDENTIFICATION, NON_IDENTIFICATION, HAR, ROI, CROSSING
    • workspaceId
      • Workspace identifier
      • Data type: ID.

Example Request:

{
events(filters: {date: {exact: "2023-05-30T08:20:05.041000+00:00"}}) {
totalCount
collectionItems {
id
date
data
agentId
cameraId
creationDate
lastModified
type
workspaceId
activityId
}
}
}

Example Response:

API returns the following result:
{
"data": {
"events": {
"totalCount": 1,
"collectionItems": [
{
"id": "***",
"date": "2023-05-30T08:20:05.041000+00:00",
"data": {
"$image": {
"id": "***"
},
"$original_image": {
"id": "***"
}
},
"agentId": "***",
"cameraId": "***",
"creationDate": "2023-05-30T08:20:08.106105+00:00",
"lastModified": "2023-05-30T08:20:08.106105+00:00",
"type": "NON_IDENTIFICATION",
"workspaceId": "***",
"activityId": "***"
}
]
}
}
}