1. For each machine, a static API key will be assigned which is constant for all the calls.
2. As of now, Machine auth is only enabled for the below endpoint:
3. API key can be set to active/inactive.
Endpoint:
a. ‘building_id’ and ‘floor_id’ (floor_id is optional here)
This will return the last motion detection for this building and floor.
Note: If no last motion was detected for a sensor, last_motion_detect will be shown as “null”
b. ‘asset_id’
This will return the last motion detection for this asset.
c. ‘tag_name’
This will return the last motion detection for this tag name.
d. Date time ‘to’ and ‘from’
This will return the last motion detection between a selected date range.
e. No Parameter
This will return the last motion detection for all sensors under this client.
This Endpoint will only work if you provide machine registered token in x-api-token
For example:
How can you create this token? This is described below.
Endpoints:
1.
This will create an API key for a client machine.
Body will be:
{"status" : "active/inactive"}
2.
This will give the details of a particular API key.
3.
This will delete the API key for that machine permanently.
4.
This will update the status of a machines API key to active/inactive.