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": "1fc3d440-16f3-489a-b926-86d7ebcbd34c",
  "name": "sample string 2",
  "direction": "sample string 3",
  "distribution_id": "b75f51a8-83f9-4da9-a86a-8af4d64a3c4b",
  "guard_id": "5b1bbee3-7586-4114-a608-4d660ba227f9",
  "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>b75f51a8-83f9-4da9-a86a-8af4d64a3c4b</distribution_id>
  <guard_id>5b1bbee3-7586-4114-a608-4d660ba227f9</guard_id>
  <id>1fc3d440-16f3-489a-b926-86d7ebcbd34c</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:
"65063e14-a3de-4b4b-b456-9f4f0a1146f9"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">65063e14-a3de-4b4b-b456-9f4f0a1146f9</guid>