Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "violations": 6, //The number of Distance Tracking violations for this device
  "closeDevices": 2, //The number of unique devices that were associated with this device's Distance Trcking violations
  "recent": [
    //Each entry is an hourly report of the number Distance Tracking violations for this device
    {
      "interval": "HOURLY",
      "timestamp": "2020-07-17T12:00:00Z", //ISO8601 RFC3339Nano
      "violations": 1
    },
    {
      "interval": "HOURLY",
      "timestamp": "2020-07-17T11:00:00Z",
      "violations": 4
    },
    {
      "interval": "HOURLY",
      "timestamp": "2020-07-17T10:00:00Z",
      "violations": 1
    }
  ],
  "contacts": [
    //Each entry is a report of a Contact Event (either DISTANCE for Distance Violations or GEOFENCE for a shared geofence with another device at this time)
    {
      "riskLevel": "LOW", //The calculated risk level of this contact event
      "deviceId": "8445671781542985407", //The Bluzone deviceId of the device associated with this contact event
      "contactType": "GEOFENCE", //Type of contact (DISTANCE or GEOFENCE)
      "locationName": "BluFi062", //The name of the Bluzone geofence
      "locationId": "125303", //The Bluzone locationId
      "floor": "1", //The configured floor value of the Bluzone location
      "lastContact": "2020-07-17T04:19:33.809Z", //Last contact time with the associated device (ISO8601 RFC3339Nano)
    },  "durationMillis": 11873 //The {total time of this contact event, in "riskLevel": "LOW",milliseconds
    },
    {
      "deviceId": "17895940144574406572",
      "contactType": "GEOFENCE",
      "locationName": "BluFi062",
      "locationId": "125303",
      "floor": "1",
      "lastContact": "2020-07-17T04:19:33.809Z",
    },  "durationMillis": 11873
 {   },
   "riskLevel": "LOW", {
      "deviceId": "17895940144574406572",
      "contactType": "GEOFENCE",
      "locationName": "BluFi062",
      "locationId": "125303",
      "floor": "1",
      "lastContact": "2020-07-17T13:30:17.532Z",
      "durationMillis": 11873
    }
  ]
}

cURL Example

Code Block
curl -X POST -H "BZID: ABCDEFGHJILKMNOP" -H "Content-Type: application/json" -d '{
	"start": "2020-06-29T22:08:18.095Z",
	"end": "2020-06-30T22:08:18.095Z"
}' "https://bluzone.io/portal/papis/dts/v1/api/deviceContactReport/111/14458689340104137112"

...

Code Block
{
  "locationId": "62", //Bluzone locationId
  "locationName": "Auto-generated", //Bluzone locationName
  "violations": 1101, //The number of Distance Tracking violations at the requested location during the requested period
  "uniqueDevices": 29, //The unique number of devices which had a Distance Tracking violation
  "recent": [
    //Each entry is an hourly report of the number Distance Tracking violations and unique number of devices for this location
    {
      "interval": "HOURLY",
      "timestamp": "2020-07-08T02:00:00Z",
      "violations": 3,
      "uniqueViolations": 3
    },
    {
      "interval": "HOURLY",
      "timestamp": "2020-07-08T00:00:00Z",
      "violations": 1,
      "uniqueViolations": 1
    },
    {
      "interval": "HOURLY",
      "timestamp": "2020-07-09T19:00:00Z",
      "violations": 2,
      "uniqueViolations": 2
    }
  ],
  "violationsMap": [
    //Each entry is a unique latitude/longitude tuple and the number of associated Distance Tracking violations at that location
    {
      "lat": 26.205577,
      "lng": -80.138385,
      "count": 470
    },
    {
      "lat": 26.205629,
      "lng": -80.138518,
      "count": 1
    }
  ],
  "devicesSummary": [
    //Each entry is a unique device id and the number of associated Distance Tracking packet violations for this device (i.e. the number of times a beaon reported it was too close to another beacon)
    {
      "deviceId": "200042",
      "violations": 1
    },
    {
      "deviceId": "200049",
      "violations": 1
    },
    {
      "deviceId": "200036",
      "violations": 53
    }
  ],
  "violationsResult": [
    //Each entry is a report of a Distance Violation event within the requested location
    {
      "totalDevices": 1, //The number of devices that were in violation with the reporting beacon
      "sourceDeviceId": "14744340248622994841", //The ID of the beacon the reported the violation
      "locationId": "14712", //The ID of the Bluzone location where the violation occured
      "locationName": "Austin Facility", //The name of the Bluzone location
      "floor": 1, //The floor of the Bluzone location
      "blufId": "106709", //The ID of the Blufi which reported the violation
      "blufiName": "BluFi015", //The name of the Blufi
      "durationMillis": "25115", //The total time of the violation
      "dateViolated": "2020-07-22T16:10:16Z", //The ISO8601 RFC339Nano Date of the violation
      "dateCleared": "2020-07-22T16:10:41Z" //The ISO8601 RFC339Nano Date of the clear, if applicable
    },
    {
      "totalDevices": 1,
      "sourceDeviceId": "9834777888017481246",
      "locationId": "14712",
      "locationName": "Austin Facility",
      "floor": 1,
      "blufId": "106738",
      "blufiName": "BluFi044",
      "durationMillis": "75373",
      "dateViolated": "2020-07-22T16:09:20Z",
      "dateCleared": "2020-07-22T16:10:35Z"
    },
    {
      "totalDevices": 1,
      "sourceDeviceId": "1376582239814772076",
      "locationId": "14712",
      "locationName": "Austin Facility",
      "floor": 1,
      "blufId": "106748",
      "blufiName": "BluFi054",
      "durationMillis": "72208",
      "dateViolated": "2020-07-22T15:49:10Z",
      "dateCleared": "2020-07-22T15:50:22Z"
    }
  ]
}

cURL Example

Code Block
curl -X POST -H "BZID: ABCDEFGHIJKLNOP" -H "Content-Type: application/json" -d '{
	"start": "2020-06-20T14:26:26.462Z",
	"end": "2020-07-11T14:26:26.462Z"
}' "https://bluzone.io/portal/papis/dts/v1/api/distanceViolationHistory/111/62"