Get presence state for multiple devices
GET
/presence/
const url = 'https://api.occulights.com/api/v1/presence/?id=example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.occulights.com/api/v1/presence/?id=example' \ --header 'Authorization: <Authorization>'Get current presence status for multiple devices by their IDs
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”id
required
Array<string> format: uuid
Sensor IDs
Responses
Section titled “Responses”OK
Media typeapplication/json
object
key
additional properties
object
deviceId
string
deviceMac
string
deviceType
string
error
string
humidity
integer
lastSeen
string
localIp
string
prebooked
boolean
presenceForced
boolean
presenceStatus
string
swVersion
string
temperature
number
Example generated
{ "additionalProperty": { "deviceId": "example", "deviceMac": "example", "deviceType": "example", "error": "example", "humidity": 1, "lastSeen": "example", "localIp": "example", "prebooked": true, "presenceForced": true, "presenceStatus": "example", "swVersion": "example", "temperature": 1 }}Bad Request
Media typeapplication/json
object
message
string
Example generated
{ "message": "example"}Unauthorized
Media typeapplication/json
string
Example generated
exampleNot Found
Media typeapplication/json
object
message
string
Example generated
{ "message": "example"}Internal Server Error
Media typeapplication/json