Smart Device

Smart device object

{
"alertTypeSignals": [
{
"alertTypes": [
"AREA",
"APRON"
],
"signalType": "STATIC",
"signalDuration": 10
}
],
"name": "et non pariatur proident",
"connectionMethod": "MQTT_EMBEDDED",
"ipAddress": "127.0.0.1",
"cameraId": "b329e635-DaD6-3C15-E4eD-3F7AfbDce2BE",
"facilityId": "aA4bbFb0-FB65-4Ee9-8aCb-64Aa07efe0Bb",
"username": "consequat",
"password": "password1234"
}

Endpoints


Create a smart device

POST/facilities/:facilityId/smart_devices

Roles:

facilities:write

Arguments

PATH PARAMETERS
  • :facilityId UUID required Id of the facility
BODY
  • cameraId UUID required Id of the camera
  • name String required Name of the device
  • alertTypeSignals List[AlertTypeSignal] required
    • AlertTypeSignal Object
      • alertTypes List[Enum]
        • APRON
        • BANNISTER_USAGE
        • CLEAN_PEDESTRIAN_WAYS
        • CLEAN_VEHICLE_ROADS
        • CLIMBING
        • MAX_WORKER_IN_CONFINED_SPACE
        • MIN_WORKER_IN_CONFINED_SPACE
        • CONTACT_WITH_ELECTRICITY
        • CRANE_AREA
        • CUSTOM
        • DYNAMIC_DELIMITATION_AREA
        • EXCLUSION_ZONE
        • FACE_MASK
        • FIRE_DETECTION
        • GLASSES
        • GLOVE
        • GROUP
        • GROUPING
        • HELMET
        • LEAKAGE_AND_SPILL
        • LIGHT_CONTROLS
        • LINE_OF_FIRE
        • MACHINE_MAN_RESTRICTED_AREA
        • MANDOWN
        • MASK
        • OPEN_CLOSED_DOORS
        • PEDESTRIAN_WAY_VIOLATION
        • REFLECTIVE_VEST
        • RESTRICTED_HEIGHT
        • SCISSOR_LIFT_HELMET_USAGE
        • VEHICLE_PPE_COMPLIANCE
        • SLEEVE
        • SOCIAL_DISTANCE
        • SPEED_LIMIT
        • STATIC_DELIMITATION_AREA
        • TIME_LIMITED_AREA
        • UNATTENDED_OBJECT_DETECTION
        • VEHICLE_RESTRICTED_AREA
        • VEHICLE_OPERATION_ZONE
        • VEHICLE_NEAR_MISS
      • signalType Enum
        • STATIC
        • BLINKING
      • signalDuration Int
  • ipAddress String required
  • port Int required
  • connectionMethod Enum required
    • MQTT_EMBEDDED
    • MQTT_EXISTING
    • HTTP
  • username optional
  • password optional

Response

Returns a success response

{
"status": "ok",
"message": "Smart device created"
}

Get smart devices

GET/facilities/:facilityId/smart_devices

Roles:

facilities:read

Arguments

PATH PARAMETERS
  • :facilityId UUID required Id of the facility

Response

Returns a list of smart device objects

{
"status": "ok",
"data": [
{
"alertTypeSignals": [
{
"alertTypes": [
"AREA",
"APRON"
],
"signalType": "STATIC",
"signalDuration": 10
}
],
"name": "et non pariatur proident",
"connectionMethod": "MQTT_EMBEDDED",
"ipAddress": "127.0.0.1",
"cameraId": "b329e635-DaD6-3C15-E4eD-3F7AfbDce2BE",
"facilityId": "aA4bbFb0-FB65-4Ee9-8aCb-64Aa07efe0Bb",
"username": "consequat",
"password": "password1234"
}
]
}

Get a smart devices

GET/facilities/:facilityId/smart_devices/:smartDeviceId

Roles:

facilities:read

Arguments

PATH PARAMETERS
  • facilityId UUID required Id of the facility
  • smartDeviceId UUID required Id of the smart device

Response

Returns a smart device object

{
"status": "ok",
"data": {
"alertTypeSignals": [
{
"alertTypes": [
"AREA",
"APRON"
],
"signalType": "STATIC",
"signalDuration": 10
}
],
"name": "et non pariatur proident",
"connectionMethod": "MQTT_EMBEDDED",
"ipAddress": "127.0.0.1",
"cameraId": "b329e635-DaD6-3C15-E4eD-3F7AfbDce2BE",
"facilityId": "aA4bbFb0-FB65-4Ee9-8aCb-64Aa07efe0Bb",
"username": "consequat",
"password": "password1234"
}
}

Update a smart devices

PUT/facilities/:facilityId/smart_devices/:smartDeviceId

Roles:

facilities:write

Arguments

PATH PARAMETERS
  • facilityId UUID required Id of the facility
  • smartDeviceId UUID required Id of the smart device
BODY
  • cameraId UUID required Id of the camera
  • name String required Name of the device
  • alertTypeSignals List[AlertTypeSignal] required
    • AlertTypeSignal Object
      • alertTypes List[Enum]
        • APRON
        • BANNISTER_USAGE
        • CLEAN_PEDESTRIAN_WAYS
        • CLEAN_VEHICLE_ROADS
        • CLIMBING
        • MAX_WORKER_IN_CONFINED_SPACE
        • MIN_WORKER_IN_CONFINED_SPACE
        • CONTACT_WITH_ELECTRICITY
        • CRANE_AREA
        • CUSTOM
        • DYNAMIC_DELIMITATION_AREA
        • EXCLUSION_ZONE
        • FACE_MASK
        • FIRE_DETECTION
        • GLASSES
        • GLOVE
        • GROUP
        • GROUPING
        • HELMET
        • LEAKAGE_AND_SPILL
        • LIGHT_CONTROLS
        • LINE_OF_FIRE
        • MACHINE_MAN_RESTRICTED_AREA
        • MANDOWN
        • MASK
        • OPEN_CLOSED_DOORS
        • PEDESTRIAN_WAY_VIOLATION
        • REFLECTIVE_VEST
        • RESTRICTED_HEIGHT
        • SCISSOR_LIFT_HELMET_USAGE
        • VEHICLE_PPE_COMPLIANCE
        • SLEEVE
        • SOCIAL_DISTANCE
        • SPEED_LIMIT
        • STATIC_DELIMITATION_AREA
        • TIME_LIMITED_AREA
        • UNATTENDED_OBJECT_DETECTION
        • VEHICLE_RESTRICTED_AREA
        • VEHICLE_OPERATION_ZONE
        • VEHICLE_NEAR_MISS
      • signalType Enum
        • STATIC
        • BLINKING
      • signalDuration Int
  • ipAddress String required
  • port Int required
  • connectionMethod Enum required
    • MQTT_EMBEDDED
    • MQTT_EXISTING
    • HTTP
  • username optional
  • password optional

Response

Returns a success message

{
"status": "ok",
"message": "Smart device updated"
}

Delete a smart devices

DELETE/facilities/:facilityId/smart_devices/:smartDeviceId

Roles:

facilities:write

Arguments

PATH PARAMETERS
  • facilityId UUID required Id of the facility
  • smartDeviceId UUID required Id of the smart device

Response

Returns a success message

{
"status": "ok",
"message": "Smart device deleted"
}

Simulate alert on a smart devices

POST/facilities/:facilityId/smart_devices/:smartDeviceId/simulateAlert

Roles:

facilities:write

Arguments

PATH PARAMETERS
  • facilityId UUID required Id of the facility
  • smartDeviceId UUID required Id of the smart device
QUERY STRING PARAMETERS
  • alertType String required Alert type to simulate

Response

Returns a success message

{
"status": "ok",
"message": "Simulated alert sent"
}