Alerts

Alert object

{
"id": "132a53cb-c9c4-4924-9a28-bb24d4af92af",
"cameraId": "8b084a37-6fd4-4c1b-beea-ea403917791b",
"name": "Danger Zone Violation",
"count": 2,
"createdAt": "2020-02-14T07:43:00Z",
"message": "2 person detected in danger zone area.",
"url": "https://images.intenseye.com/e1d2e50a-58f0-4a14-806f-f3968e52810f-1581666181.jpg",
"imageDimensions": {
"width": 1920,
"height": 1080
},
"canvasDimensions": {
"width": 1466,
"height": 895
},
"violatingCoordinates": [
{
"x": 713,
"y": 463
}
],
"area": [
{
"x": 713,
"y": 463
},
{
"x": 854,
"y": 510
},
{
"x": 302,
"y": 181
},
{
"x": 456,
"y": 388
}
],
"storageClass": "s3",
"info": {},
"bookmark": false,
"alertRuleId": "d9eba7df-b1f4-446b-ab11-2186372a6ee3",
"localCreatedAt": "2020-09-23T00:38:04Z",
"falsePositive": false,
"thumbnailUrl": "https://images.intenseye.com/e1d2e50a-58f0-4a14-806f-f3968e52810f-1581666181.jpg",
"workspaceId": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"areaIds": []
}

Endpoints


Get alerts

POST/alerts

Arguments

BODY
  • page Int optional Page number
  • count Int optional Count
  • facilityId UUID optional Id of the facility
  • cameraId UUID optional Id of the camera
  • start Long required Start of the timestamp
  • end Long required End of the timestamp
  • type List[String] optional Filter by alert types.
  • severity List[String] optional Filter by list of alert severities.
  • bookmark Boolean optional Filter by bookmark
  • observation Boolean optional Filter by observation
  • areaId UUID optional Filter by areaId
  • falsePositive Boolean optional Filter by false positive value

Returns

Returns a list of alert object

{
"status": "ok",
"data": {
"page": 1,
"count": 10,
"total": 139,
"alerts": [
{
"id": "132a53cb-c9c4-4924-9a28-bb24d4af92af",
"cameraId": "8b084a37-6fd4-4c1b-beea-ea403917791b",
"name": "Danger Zone Violation",
"count": 2,
"createdAt": "2020-02-14T07:43:00Z",
"message": "2 person detected in danger zone area.",
"url": "https://images.intenseye.com/e1d2e50a-58f0-4a14-806f-f3968e52810f-1581666181.jpg",
"imageDimensions": {
"width": 1920,
"height": 1080
},
"canvasDimensions": {
"width": 1466,
"height": 895
},
"violatingCoordinates": [
{
"x": 713,
"y": 463
}
],
"area": [
{
"x": 713,
"y": 463
},
{
"x": 854,
"y": 510
},
{
"x": 302,
"y": 181
},
{
"x": 456,
"y": 388
}
],
"storageClass": "s3",
"info": {},
"bookmark": false,
"alertRuleId": "d9eba7df-b1f4-446b-ab11-2186372a6ee3",
"localCreatedAt": "2020-09-23T00:38:04Z",
"falsePositive": false,
"thumbnailUrl": "https://images.intenseye.com/e1d2e50a-58f0-4a14-806f-f3968e52810f-1581666181.jpg",
"workspaceId": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"areaIds": []
}
]
}
}

Get available alert types

GET/alerts/available_types

Arguments

QUERY STRING PARAMETERS
  • facilityId UUID optional Id of the facility
  • cameraId Seq[UUID] optional Ids of the cameras

Returns

Returns a list of available alerts

{
"status": "ok",
"data": [
"MACHINE_MAN_RESTRICTED_AREA",
"MAX_WORKER_IN_CONFINED_SPACE",
"RESTRICTED_HEIGHT",
"SOCIAL_DISTANCE",
"STATIC_DELIMITATION_AREA",
"VEHICLE_PPE_COMPLIANCE"
]
}

Get alert areas

GET/alerts/areas

Arguments

QUERY STRING PARAMETERS
  • facilityId UUID optional Id of the facility
  • cameraId UUID optional Id of the camera

Returns

Returns a list of areas

{
"status": "ok",
"data": [
{
"id": "9f2ca469-a949-44cb-8660-9a76fc18e6e3",
"type": "AREA",
"name": "Area 1",
"children": [
{
"id": "f810103e-89fe-49ee-b694-f89402616d27",
"type": "STATIC_DELIMITATION_AREA",
"objects": [
"PERSON"
],
"highPrecision": true
}
],
"points": [
{
"x": 7,
"y": 5
},
{
"x": 1898,
"y": 8
},
{
"x": 1898,
"y": 982
},
{
"x": 6,
"y": 1070
}
],
"color": "#f5222d"
}
]
}

Get alert

GET/alerts/:alertId

Roles:

alerts:read

Arguments

PATH PARAMETERS
  • :alertId UUID required Id of the alert

Returns

Returns an alert object

{
"status": "ok",
"data": {
"id": "132a53cb-c9c4-4924-9a28-bb24d4af92af",
"cameraId": "8b084a37-6fd4-4c1b-beea-ea403917791b",
"name": "Danger Zone Violation",
"count": 2,
"createdAt": "2020-02-14T07:43:00Z",
"message": "2 person detected in danger zone area.",
"url": "https://images.intenseye.com/e1d2e50a-58f0-4a14-806f-f3968e52810f-1581666181.jpg",
"imageDimensions": {
"width": 1920,
"height": 1080
},
"canvasDimensions": {
"width": 1466,
"height": 895
},
"violatingCoordinates": [
{
"x": 713,
"y": 463
}
],
"area": [
{
"x": 713,
"y": 463
},
{
"x": 854,
"y": 510
},
{
"x": 302,
"y": 181
},
{
"x": 456,
"y": 388
}
],
"storageClass": "s3",
"info": {},
"bookmark": false,
"alertRuleId": "d9eba7df-b1f4-446b-ab11-2186372a6ee3",
"localCreatedAt": "2020-09-23T00:38:04Z",
"falsePositive": false,
"thumbnailUrl": "https://images.intenseye.com/e1d2e50a-58f0-4a14-806f-f3968e52810f-1581666181.jpg",
"workspaceId": "f213e5dd-4b92-46f0-95df-0b9dfff4e588",
"areaIds": []
}
}

Get alert debug information

GET/alerts/:alertId/debug

Roles:

alerts:delete

Arguments

PATH PARAMETERS
  • :alertId UUID required Id of the alert

Returns

Returns an alert debug object

{
"status": "ok",
"data": {
"id": "132a53cb-c9c4-4924-9a28-bb24d4af92af",
"alertId": "8b084a37-6fd4-4c1b-beea-ea403917791b",
"data": {
"image_url": "https://images.intenseye.com/e1d2e50a-58f0-4a14-806f-f3968e52810f-1581666181.jpg",
"trackables": [],
"imageDimensions": {
"width": 1920,
"height": 1080
},
"cameraDimensions": {
"width": 1920,
"height": 1080
}
}
}
}

Update false positive status

PUT/alerts/:alertId/report

Roles:

alerts:delete

Arguments

PATH PARAMETERS
  • :alertId UUID required Id of the alert
QUERY STRING PARAMETERS
  • status Boolean required Status of the alarm

Returns

Returns a success message

{
"status": "ok",
"message": "Updated Alert Status"
}

Get alert counts for workspace

GET/workspaces/alerts/count

Arguments

QUERY STRING PARAMETERS
  • start Long required Start of the timestamp
  • end Long required End of the timestamp
  • aggregate Enum required
    • day
    • week
    • month Aggregation identifier

Returns

Returns alert counts per timestamp

{
"status": "ok",
"data": [
{
"key": "2020-04-04T00:00:00.000Z",
"count": 866
},
{
"key": "2020-04-01T00:00:00.000Z",
"count": 971
},
{
"key": "2020-03-29T00:00:00.000Z",
"count": 442
},
{
"key": "2020-03-30T00:00:00.000Z",
"count": 1296
},
{
"key": "2020-04-02T00:00:00.000Z",
"count": 70
},
{
"key": "2020-03-31T00:00:00.000Z",
"count": 2063
},
{
"key": "2020-03-28T00:00:00.000Z",
"count": 439
},
{
"key": "2020-04-03T00:00:00.000Z",
"count": 1291
}
]
}

Get alert digest

GET/workspaces/facilities/:facilityId/alerts/digest

Roles:

cameras:readfacilities:readalerts:read

Arguments

PATH PARAMETERS
  • :facilityId UUID required Id of the facility to retrieve
QUERY STRING PARAMETERS
  • cameraId UUID optional Id of the camera

Returns

Returns alert counts per timestamp

{
"status": "ok",
"data": [
{
"facilityId": "132a53cb-c9c4-4924-9a28-bb24d4af92af",
"aggregationResults": [
{
"key": "2020-04-04T00:00:00.000Z",
"count": 866
},
{
"key": "2020-04-01T00:00:00.000Z",
"count": 971
},
{
"key": "2020-03-29T00:00:00.000Z",
"count": 442
},
{
"key": "2020-03-30T00:00:00.000Z",
"count": 1296
},
{
"key": "2020-04-02T00:00:00.000Z",
"count": 70
},
{
"key": "2020-03-31T00:00:00.000Z",
"count": 2063
},
{
"key": "2020-03-28T00:00:00.000Z",
"count": 439
},
{
"key": "2020-04-03T00:00:00.000Z",
"count": 1291
}
]
}
]
}

Update bookmarks

PUT/alerts/bookmark

Roles:

alerts:write

Arguments

BODY
  • alertIds List[UUID] required List of alert ids
  • bookmark Boolean required

Returns

Returns a success message

{
"status": "ok",
"message": "Alert bookmarks updated"
}