POST api/lockapi/add?siteId={siteId}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| siteId | globally unique identifier |
None. |
Body Parameters
LockViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| id | globally unique identifier |
None. |
|
| name | string |
String length: inclusive between 0 and 100 |
|
| direction | string |
Required String length: inclusive between 0 and 2 |
|
| distribution_id | globally unique identifier |
None. |
|
| guard_id | globally unique identifier |
None. |
|
| active | boolean |
None. |
Request Formats
application/json, text/json
Sample:
{
"id": "d39c5d32-5a5d-4bef-be1e-36011a8029a9",
"name": "sample string 2",
"direction": "sample string 3",
"distribution_id": "8a98c285-cf42-42d3-9c7f-fbbc263ecc12",
"guard_id": "72b60117-c701-4cd2-9b99-4d5a72cd2ed3",
"active": true
}
application/xml, text/xml
Sample:
<lock xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel"> <active>true</active> <direction>sample string 3</direction> <distribution_id>8a98c285-cf42-42d3-9c7f-fbbc263ecc12</distribution_id> <guard_id>72b60117-c701-4cd2-9b99-4d5a72cd2ed3</guard_id> <id>d39c5d32-5a5d-4bef-be1e-36011a8029a9</id> <name>sample string 2</name> </lock>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
globally unique identifierResponse Formats
application/json, text/json
Sample:
"c81e71c7-15eb-4831-90d8-0309f3f19eff"
application/xml, text/xml
Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">c81e71c7-15eb-4831-90d8-0309f3f19eff</guid>