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": "f39b6dc8-f394-4bb3-892d-0725592fc767",
  "name": "sample string 2",
  "direction": "sample string 3",
  "distribution_id": "a72a6caf-2c39-494d-9b2d-49628a079ddf",
  "guard_id": "729316ac-eabf-4142-8289-7c16513dac55",
  "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>a72a6caf-2c39-494d-9b2d-49628a079ddf</distribution_id>
  <guard_id>729316ac-eabf-4142-8289-7c16513dac55</guard_id>
  <id>f39b6dc8-f394-4bb3-892d-0725592fc767</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:
"bc235db3-953a-4ffd-9318-e898bbfd0459"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">bc235db3-953a-4ffd-9318-e898bbfd0459</guid>