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": "e217db8c-1e8c-41de-bca2-f54e84c3aa15",
  "name": "sample string 2",
  "direction": "sample string 3",
  "distribution_id": "ec47f032-9a4a-43d5-898a-a79cc825e374",
  "guard_id": "16f01f31-e1f6-4483-8fe4-7206e77d290b",
  "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>ec47f032-9a4a-43d5-898a-a79cc825e374</distribution_id>
  <guard_id>16f01f31-e1f6-4483-8fe4-7206e77d290b</guard_id>
  <id>e217db8c-1e8c-41de-bca2-f54e84c3aa15</id>
  <name>sample string 2</name>
</lock>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'LockViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"603e487e-2857-4ac6-bd46-27e36c24966b"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">603e487e-2857-4ac6-bd46-27e36c24966b</guid>