Skip to main content
POST
/
api
/
occupancy
/
getOccupancyEventsForSensor
Get occupancy events for sensor
curl --request POST \
  --url https://api2.rhombussystems.com/api/occupancy/getOccupancyEventsForSensor \
  --header 'Content-Type: application/json' \
  --header 'x-auth-apikey: <api-key>' \
  --header 'x-auth-scheme: <x-auth-scheme>' \
  --data '
{
  "createdAfterMs": 1640908800000,
  "createdBeforeMs": 1640995200000,
  "limit": 100,
  "sensorUuid": "AAAAAAAAAAAAAAAAAAAAAA"
}
'
{
  "error": true,
  "errorMsg": "<string>",
  "events": [
    {
      "baseStationUuid": "AAAAAAAAAAAAAAAAAAAAAA",
      "batteryPercentage": 123,
      "bleDeviceUuid": "AAAAAAAAAAAAAAAAAAAAAA",
      "bleRssi": 123,
      "closeBaseStations": [
        "AAAAAAAAAAAAAAAAAAAAAA"
      ],
      "locationUuid": "AAAAAAAAAAAAAAAAAAAAAA",
      "lux": 123,
      "orgUuid": "AAAAAAAAAAAAAAAAAAAAAA",
      "state": "VACANT",
      "stateChanged": true,
      "subLocationsHierarchyKey": "AAAAAAAAAAAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAA",
      "tampered": true,
      "timestampMs": 123
    }
  ],
  "warningMsg": "<string>"
}

Authorizations

x-auth-apikey
string
header
required

Your API key for Rhombus.

Headers

x-auth-scheme
string
default:api-token
required

Authentication scheme indicator ("api-token").

Required string length: 9

Body

application/json

Request object for getting occupancy events for a specific sensor.

createdAfterMs
integer<int64> | null

Filter events created after this timestamp (milliseconds since epoch)

Example:

1640908800000

createdBeforeMs
integer<int64> | null

Filter events created before this timestamp (milliseconds since epoch)

Example:

1640995200000

limit
integer<int32> | null

Maximum number of events to return

Example:

100

sensorUuid
string<RUUID> | null

base 64 (url-safe) uuid string

Example:

"AAAAAAAAAAAAAAAAAAAAAA"

Response

200 - application/json

OK

Response object containing occupancy events for a specific sensor.

error
boolean | null
errorMsg
string | null
events
object[] | null

List of occupancy events for the sensor

warningMsg
string | null