...
Field Name | Nested Field Name | Description | Schema | ||||||
---|---|---|---|---|---|---|---|---|---|
population | The number of unique beacons observed within the requested time range | uint32 | |||||||
compliant | The percentage of unique beacon without any Distance Tracking Violations within the requested time range | float | |||||||
violations | The number of distance tracking violations Distance Tracking Violations observed within the requested time range | uint32 | |||||||
uniqueDevices | The number of unique devices that have violated a Distance Tracking Violation policy within the requested time range | uint32 | |||||||
recent | An array of objects whose fields detail the recent distance violations Distance Tracking Violations by hour for the requested time range | []DistanceViolationRollup | |||||||
interval | The rollup interval. Only HOURLY is available for now.String | enum { | |||||||
timestamp | The timestamp of the rollup, formatted according to RFC3339 | String | |||||||
population | The number of unique devices observed within this rollup | uint32 | |||||||
violations | The number of Distance Tracking Violations within this rollup | uint32 | |||||||
uniqueViolations | The number of unique devices which had at least one violation within this rollup | uint32 | |||||||
todaysViolations | An array of objects whose fields detail the location and corresponding count of Distance Tracking Violations for the requested time range | []DistanceViolationAggregation | |||||||
lat | The If RTLS is enabled for the project which the requested beacon belongs to, it is the latitude of the location of the Distance Violation | double | lng | The longitude of the location of the Distance Violation | double | count | The amount of Distance last-known location at time of write. Otherwise, it is the latitude of the first Blufi to report this event at time of write. | double | |
lng | If RTLS is enabled for the project which the requested beacon belongs to, it is the longitude of the location of the last-known location at time of write. Otherwise, it is the longitude of the first Blufi to report this event at time of write. | double | |||||||
count | The amount of Distance Tracking Violations at this location | uint32 | |||||||
topViolatingBeacons | An array of objects detailing the amount of Distance Tracking Violations per each device for the requested time range, sorted by count, descending | []DistanceViolationBeacon | |||||||
id | The device ID | String | |||||||
violationCount | The amount of Distance Tracking Violations | uint32 | |||||||
topViolatingAreas | An array of objects detailing the amount of Distance Tracking Violations per each location for the requested time range, sorted by count, descending | []DistanceViolationLocation | |||||||
name | The location name | String | |||||||
id | The location IDIf RTLS is enabled for the project which the requested beacon belongs to, it is the ID of the location of the last-known location at time of write. Otherwise, it is the ID of the location of the first Blufi to report this event at time of write. | uint64 | |||||||
violationCount | The amount of Distance Tracking Violations | uint32 |
Sample Response
...
Type | Name | Required | Description | Schema | Default |
---|---|---|---|---|---|
Path | projectId | YES | The ID of the project, e.g. 111 | int | |
Path | deviceId | YES | The ID of the device, e.g. 14458689340104137112 | string | |
Body | start | YES | The start date of the desired time range, in ISO8601 RFC339Nano format | string | |
Body | end | YES | The end date of the desired time range, in ISO8601 RFC339Nano format | string |
...
Response
...
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)
{
"deviceId": "8445671781542985407", //The Bluzone deviceId of the device associated with this contact event
"deviceName": "My Device", //The name of the device in Bluzone
"contactType": "DISTANCE", //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)
"durationMillis": 11873 //The total time of this contact event, in milliseconds
"contactStart": "2020-07-17T04:19:21.936Z", //The start time of this contact event (ISO8601)
"uuid": "d3a422b0-5db3-4189-62ed-45b6d858ecf1", //For DISTANCE events, the UUID of the close session. For GEOFENCE events, the UUID of the corresponding policy event
"latitude": 15.139619643472987, //For DISTANCE events, the latitude of the last known RTLS location of the source beacon at the time this event was created
"longitude": 57.13328996474993, //For DISTANCE events, the longitude of the last known RTLS location of the source beacon at the time this event was created
"totalContactTime": 2097, //For DISTANCE events, the total accumulated close contact time across all sessions for the beacon and seen beacon, in seconds
"backfill": true, //For DISTANCE events, whether or not this contact event happened outside of blufi coverage (offline)
},
{
"deviceId": "17895940144574406572",
"deviceName": "My Other Device", //The name of the device in Bluzone
"contactType": "GEOFENCE",
"locationName": "BluFi062",
"locationId": "125303",
"floor": "1",
"lastContact": "2020-07-17T04:19:33.809Z",
"durationMillis": 11873,
"contactStart": "2020-07-17T04:19:21.936Z", //The start time of this geofence event (ISO8601)
"uuid": "d3a422b0-5db3-4189-62ed-45b6d858ecf1", //For DISTANCE events, the UUID of the close session. For GEOFENCE events, the UUID of the corresponding policy event
"latitude": 15.139619643472987, //The latitude of the last known RTLS location of the source beacon at the time this event was created
"longitude": 57.13328996474993, //The longitude of the last known RTLS location of the source beacon at the time this event was created
"geofenceId": 2, //The ID of the geofence in Bluzone
"geofenceName": "My Geofence" //The Name of the geofence in Bluzone
}
]
} |
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" |
Distance Violation History
...
Method
...
POST
...
URL
...
Code Block |
---|
https://bluzone.io/portal/papis/dts/v1/api/deviceContactReport/{projectId}/{locationId} |
...
Response Content-Type
...
application/json
...
Header
...
bzid
...
Description
...
Get the distance violation history of a Bluzone location.
Parameters
Type | Name | Required | Description | Schema | Default | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Path | projectId | YES | The ID of the project, e.g. 111 | int | Path | locationId | YES | The ID of the location, e.g. 1443 | int | Body | start | YES | The start date of the desired time range, in ISO8601 RFC339Nano format | string | Body | end | YES | The end date of the desired time range, in ISO8601 RFC339Nano format | stringField Name | Nested Field Name | Description | Schema |
violations | The number of Distance Tracking Violations for the requested device within the requested time range | uint32 | ||||||||||||||||||||
closeDevices | The number of unique devices that were associated with the requested device for the requested time range | uint32 | ||||||||||||||||||||
recent | An array of objects detailing an hourly report of the number of Distance Tracking Violations for the requested device for the requested time range | []DeviceContactReportRollup | ||||||||||||||||||||
interval | The rollup interval. Only HOURLY is available for now. | enum { | ||||||||||||||||||||
timestamp | The timestamp of the rollup, formatted according to RFC3339 | String | ||||||||||||||||||||
violations | The number of Distance Tracking Violations within this rollup | uint32 | ||||||||||||||||||||
| An array of objects detailing the contact events for the requested device for the requested time range | []DeviceContactReportEvent | ||||||||||||||||||||
devceId | The device ID of the participating beacon (the “seen” beacon by the requested beacon) | String | ||||||||||||||||||||
contactType | The Contact Type of the event; either DISTANCE or GEOFENCE | enum { | ||||||||||||||||||||
locationName | The name of the location at which this contact event occurred at time of write. If this is a DISTANCE event: | String | ||||||||||||||||||||
locationId | The ID of the location at which this contact event occurred at time of write. If this is a DISTANCE event: | uint64 | ||||||||||||||||||||
floor | The floor number of the location at which this contact event occurred at time of write. | uint64 | ||||||||||||||||||||
lastContact | The timestamp of the last contact between the requested device and the participating device, formatted according to RFC3339 | String | ||||||||||||||||||||
durationMillis | The duration of this contact event, in milliseconds | uint64 | ||||||||||||||||||||
contactStart | The timestamp of the beginning of contact between the requested device and the participating device, formatted according to RFC3339 | String | ||||||||||||||||||||
uuid | The UUID of this contact event | String (UUID) | ||||||||||||||||||||
deviceName | The name of the participating device at time of write | String | ||||||||||||||||||||
geofenceId | If this is a GEOFENCE event, this is the geofence ID in which this event occurred. Otherwise, it is null. | uint64 | ||||||||||||||||||||
geofenceName | If this is a GEOFENCE event, this is the name of the geofence in which this event occurred. Otherwise, it is null. | String | ||||||||||||||||||||
latitude | If this is a DISTANCE event: If RTLS is enabled for the project which the requested beacon belongs to, it is the latitude of the last-known location at time of write. Otherwise, it is the latitude of the first Blufi to report this event at time of write. If this is a GEOFENCE event, this field is null. | double | ||||||||||||||||||||
longitude | If this is a DISTANCE event: If RTLS is enabled for the project which the requested beacon belongs to, it is the longitude of the last-known location at time of write. Otherwise, it is the latitude of the first Blufi to report this event at time of write. If this is a GEOFENCE event, this field is null. | double | ||||||||||||||||||||
totalContactTime | DEPRECATED, ignore | uint64 | ||||||||||||||||||||
backfill | If this is a DISTANCE event: This flag is set to true when this contact event for the requested device and participating device was received by Bluzone at least one minute after any previous contact event was received for the requested and participating devices. When this flag is true, the “offlineContactTimeSeconds” field is populated with the total accumulated contact time between the requested device and participating device while outside of Blufi coverage. If the requested device and participating device are still in contact within this same contact event when they return to Blufi coverage, the “offlineContactTime” field will continue to increase until this contact event ends. If this is a GEOFENCE event, this field is null. | boolean | ||||||||||||||||||||
offlineContactTimeSeconds | For DISTANCE events: This field is populated when the “backfill” flag is true, otherwise, it is null. This field is the total accumulated contact time between the requested device and participating device for this contact event while outside of Blufi coverage. If the requested device and participating device are still in contact within this same contact event when they return to Blufi coverage, this field will continue to increase until this contact event ends. | uint64 | ||||||||||||||||||||
reportingBlufiId | Unimplemented, reserved for future use | uint64 | ||||||||||||||||||||
reportingBlufiName | Unimplemented, reserved for future use | String | ||||||||||||||||||||
reportingBlufiLocationId | Unimplemented, reserved for future use | uint64 | ||||||||||||||||||||
reportingBlufiLocationName | Unimplemented, reserved for future use | String |
Sample Response
|
cURL Example
|
...
Distance Violation History
Method | POST | ||
---|---|---|---|
URL |
| ||
Response Content-Type | application/json | ||
Header | bzid | ||
Description | Get the distance violation history of a Bluzone location. |
Parameters
Type | Name | Required | Description | Schema | Default |
---|---|---|---|---|---|
Path | projectId | YES | The ID of the project, e.g. 111 | int | |
Path | locationId | YES | The ID of the location, e.g. 1443 | int | |
Body | start | YES | The start date of the desired time range, in ISO8601 RFC339Nano format | string | |
Body | end | YES | The end date of the desired time range, in ISO8601 RFC339Nano format | string |
Response
Field Name | Nested Field Name | Description | Schema |
---|---|---|---|
locationId | The location ID of the requested location | uint64 | |
locationName | The name of the requested location | String | |
violations | The number of Distance Tracking Violations for the requested location within the requested time range | uint32 | |
uniqueDevices | The number of unique participating beacons across all of the Distance Tracking Violations for the requested location within the requested time range | uint32 | |
recent | An array of objects whose fields detail the recent Distance Tracking Violations by hour for the requested location within the requested time range | []DistanceViolationHistoryRollup | |
interval | The rollup interval. Only HOURLY is available for now. | enum { | |
timestamp | The timestamp of the rollup, formatted according to RFC3339 | String | |
violations | The number of Distance Tracking Violations within this rollup | uint32 | |
uniqueViolations | The number of unique devices which had at least one violation within this rollup | uint32 | |
violationsMap | An array of objects whose fields detail the location and corresponding count of Distance Tracking Violations for the requested location within the requested time range | []DistanceViolationHistoryLocation | |
lat | If RTLS is enabled for the project which the requested location belongs to, it is the latitude of the location of the last-known location at time of write. Otherwise, it is the latitude of the first Blufi to report this event at time of write. Note that only events belonging to the requested location ID are included. | double | |
lng | If RTLS is enabled for the project which the requested location belongs to, it is the longitude of the location of the last-known location at time of write. Otherwise, it is the longitude of the first Blufi to report this event at time of write. Note that only events belonging to the requested location ID are included. | double | |
count | The amount of Distance Tracking Violations at this location. Note that only events belonging to the requested location ID are included. | uint32 | |
devicesSummary | An array of objects detailing the amount of Distance Tracking Violations for each device participating in a contact event for the requested location within the requested time range, sorted by count, descending | []DistanceViolationHistoryAggregation | |
id | The device ID | String | |
violationCount | The amount of Distance Tracking Violations | uint32 | |
violationsResult | An array of objects detailing the Distance Tracking Violations for each device participating with the requested device within the requested time range | []DistanceViolationHistoryViolation | |
totalDevices | The number of unique devices participating in this Distance Tracking Violation | uint32 | |
sourceDeviceId | The ID of the device which triggered this Distance Tracking Violation | String | |
locationId | The ID of the location for this Distance Tracking Violation. This will always match the requested location ID | uint64 | |
locationName | The name of the location of this Distance Tracking Violation at time of write | String | |
floor | The floor number of the location of this Distance Tracking Violation at time of write | uint32 | |
blufiId | If RTLS is enabled for the project which the requested location belongs to, it is the ID of the blufi of the last-known location at time of write, if available (projects which don’t use the Best Blufi RTLS setting will not have a blufi ID in their last-known location information). Otherwise, it is the ID of the first Blufi to report this event at time of write. | uint64 | |
blufiName | If RTLS is enabled for the project which the requested location belongs to, it is the name of the blufi of the last-known location at time of write, if available (projects which don’t use the Best Blufi RTLS setting will not have a blufi name in their last-known location information). Otherwise, it is the name of the first Blufi to report this event at time of write. | String | |
durationMillis | The duration of this Distance Tracking Violation, in milliseconds | uint64 | |
dateViolated | The timestamp of the beginning of this Distance Tracking Violation, formatted according to RFC3339 | String | |
dateCleared | The timestamp of the end of this Distance Tracking Violation, formatted according to RFC3339 | String |
Sample Response
|
...