This API updates device default settings in the requested site. The API accepts the settings to be updated as data parameters.
Basic Authentication, must be a partner managed account type.
Required:
siteReference = [string]
Optional:
deviceType = [string]
TimeStamp , Defaults ,DeviceType ,Settings are required fields. Timestamp can be obtained from GET site defaults API. Timestamp is used to prevent concurrency issue.
Without optional parameter, data parameter can have multiple device type setting objects and settings to be updated in each device type.
Sample PUT Parameter:
{"TimeStamp":"636543483076841449","Defaults":[{"DeviceType":"nde","Settings":[{"Key":"relockDelay","Value":"3"},
{"Key":"adaRelockDelay","Value":"30"},{"Key":"proppedDoorTrigger","Value":"20"},{"Key":"firstPersonIn","Value":"false"},
{"Key":"beeper","Value":"true"},{"Key":"failMode","Value":"Secure"},{"Key":"commFailMode","Value":"AsIs"},
{"Key":"lockType","Value":"Storeroom"},{"Key":"wifiAlertEn","Value":"true"},{"Key":"jagSectors","Value":"4"},
{"Key":"cntrlDecTimeout","Value":"50"},{"Key":"credSecNum","Value":"1"}]},{"DeviceType":"be467","Settings":
[{"Key":"relockDelay","Value":"3"},{"Key":"beeper","Value":"true"},{"Key":"jagSectors","Value":"4"},
{"Key":"cntrlDecTimeout","Value":"50"},{"Key":"credSecNum","Value":"1"}]}]}
If optional parameter ‘deviceType’ is specified in request url:
Sample PUT Parameter:
{"TimeStamp":"636543483076841449","Defaults":[{"DeviceType":"be467","Settings":[{"Key":"relockDelay","Value":"3"},
{"Key":"beeper","Value":"true"},{"Key":"jagSectors","Value":"4"},{"Key":"cntrlDecTimeout","Value":"50"},
{"Key":"credSecNum","Value":"1"}]}]}
Code: 200
Content:PUT response for multiple device types
{"TimeStamp":"636542823615744462","Defaults":[{"DeviceType":"nde","Settings":[{"Key":"relockDelay","Value":"3"},
{"Key":"adaRelockDelay","Value":"30"},{"Key":"proppedDoorTrigger","Value":"20"},{"Key":"firstPersonIn","Value":"false"},
{"Key":"beeper","Value":"true"},{"Key":"failMode","Value":"Secure"},{"Key":"commFailMode","Value":"AsIs"},
{"Key":"lockType","Value":"Storeroom"},{"Key":"wifiAlertEn","Value":"true"},{Key":"jagSectors","Value":"4"},
{"Key":"cntrlDecTimeout","Value":"50"},{"Key":"credSecNum","Value":"1"}]}]}
Scenario: Invalid token or Unauthorized user.
Code: 401 Unauthorized
Content: {“Message": "Authentication failed."}
Scenario: Device type specified in request is not found or invalid i.e. device types which are not included in site defaults feature.
Code: 404 Not Found
Content: "DeviceType not found."
Scenario: Site defaults for specified device type already exists.
Code: 412 Precondition Failed
Content: "The device type already has default settings for the facility."
Scenario: If the site reference is not valid.
Code: 400 Bad request.
Content: "Invalid SiteReference."
Scenario: If the site reference is not found in the Database.
Code: 400 Bad Request
Content: "Invalid Facility Reference.”