POST api/lockapi/add?siteId={siteId}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

LockViewModel
NameDescriptionTypeAdditional 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": "bd6bdfd9-63b2-4b03-b5e6-a440309d9422",
  "name": "sample string 2",
  "direction": "sample string 3",
  "distribution_id": "eebabf1c-72c3-416b-8f5a-5128ed18dffc",
  "guard_id": "2a5c7997-3cec-4467-8804-f50550d2848f",
  "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>eebabf1c-72c3-416b-8f5a-5128ed18dffc</distribution_id>
  <guard_id>2a5c7997-3cec-4467-8804-f50550d2848f</guard_id>
  <id>bd6bdfd9-63b2-4b03-b5e6-a440309d9422</id>
  <name>sample string 2</name>
</lock>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"99598445-65f0-45c3-8fdb-eefd0a3cc870"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">99598445-65f0-45c3-8fdb-eefd0a3cc870</guid>