Events Api
The events api allows the submission of presence and occupancy events to Calven.
Presence
A presence event indicates that a particular person is (or was) located at a particular place at a particular time.
The presence event API can be used to send historical presence events or current/real-time presence updates.
{
"sourceId": "My System",
"presenceEvents": [
{
"timestamp": "2023-05-15T10:22:45Z",
"sourceUserId": "1341"
"userEmail": "SomeUser@somedomain.com",
"locationId":"D0FA9F18-6E7F-449A-8C50-30276AA9B63F",
"locationType": "location",
"eventId": "42FA8F0D-DBB6-42AC-8618-1865DD476769"
},
{
"timestamp": "2023-05-15T10:23:45Z",
"sourceUserId": "1342"
"userId": "2F6F955E-C1BB-483D-BAE8-56D15233F11B",
"locationId":"D0FA9F18-6E7F-449A-8C50-30276AA9B63F",
"locationType": "location",
"eventId": "71FA8F0D-DBB6-42AC-8618-1865DD476769"
}
]
}
sourceId
is an identifier for your presence source.presenceEvents
is an array of up to 100 presence events.
Each presence event has a timestamp
that indicates when the presence was detected (this can be in the past) and a unique eventId
that is used to identify the resul t of the event in the response.
The user can be identified by their internal Calven userid value userId
or by their email/login userEmail
-
Note that the userEmail
value is case sensitve and must match the value that has been provisioned into Calven.
sourceUserId
is a an identifier for the user in the source system
locationId
specifies the point in the Calven location hierarchy where the presence is being reported.
locationType
specifies the type of location represeneted by locationId
- Valid values are level
, location
, place
, space
or zone
.