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": "7e824def-f8da-4b83-a8cb-1ae540aefd39",
  "name": "sample string 2",
  "direction": "sample string 3",
  "distribution_id": "d514dda5-46ef-4443-9531-c549a4edb916",
  "guard_id": "bfac4834-3559-4d7c-8288-02d0e2cd3aa4",
  "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>d514dda5-46ef-4443-9531-c549a4edb916</distribution_id>
  <guard_id>bfac4834-3559-4d7c-8288-02d0e2cd3aa4</guard_id>
  <id>7e824def-f8da-4b83-a8cb-1ae540aefd39</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:
"b491b5e1-196f-4410-8a7f-f31e29ab7d64"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">b491b5e1-196f-4410-8a7f-f31e29ab7d64</guid>