Skip to main content
Version: 1.13.0

Events

Get Events

Query events is used to get a list of events received from OMNI agent. This query is available at http://platform.$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:
      • Profile identifier
      • Data type: ID
  • type:

    • exact:
      • Event type: IDENTIFICATION and NON_IDENTIFICATION
  • 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

order:

  • date (Sorting a list of events by date):
    • ASC: from earliest to latest
    • DESC: from latest to earliest

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 and NON_IDENTIFICATION
    • 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
}
}
}

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": "***"
}
]
}
}
}