Adding new users, or more accurately, new credentials can be accomplished using a Gateway. SAM partners can utilize their host server tools* (see Basic JSON Add User Example below) to send JSON configuration information to the edge devices via a Gateway. Once the user/credential has been added to the device in the database, the user gains access to the device when the credential is presented to the device.
The following JSON example displays how a user record may be structured if it was being sent to a device from a host server.
{
"db":
{"usrRcrd":
{"deleteAll":1,
"delete":[],
"update":[],
"add":
[
{
"actDtTm": 20150303000000,
"adaEn": 0,
"crSch": [1],
"expDtTm": 20350101000000,
"fnctn": "norm",
"prCrTyp": "card",
"primeCr": "f7a580a987f982c4ee1d6e6419ad3d17",
"usrID": 3
},
{
"actDtTm": 20150303000000,
"adaEn": 0,
"crSch": [1],
"expDtTm": 20350101000000,
"fnctn": "norm",
"prCrTyp": "card",
"primeCr": "9e177a284426f7accc28b26b318b90ed",
"usrID": 4
}
]
},
"schedules":[
{"days":["Mo","Tu","We","Th","Fr","Sa","Su"],"lngth":1439,"strtHr":0,"strtMn":0}
]
}
}
Perform a PUT of a database from the host server to the device.
PUT {{GatewayIP}}/edgeDevices/dev00000/database
)_edgeDevices_dev00000_database.png)