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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

BadgeReaderViewModel
NameDescriptionTypeAdditional information
id

globally unique identifier

None.

name

string

String length: inclusive between 0 and 100

pc_id

globally unique identifier

None.

com_port

integer

None.

baudrate

integer

None.

direction

string

Required

String length: inclusive between 0 and 3

has_correspondence

boolean

Required

active

boolean

Required

badge_reader_type_id

globally unique identifier

None.

site_id

globally unique identifier

None.

parity

integer

Required

data_bits

integer

Required

stop_bits

integer

Required

handshake

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "id": "5327f781-d8d9-4075-b543-3fae5b94c90a",
  "name": "sample string 2",
  "pc_id": "9297a59e-e728-476d-8059-257ac35c82af",
  "com_port": 1,
  "baudrate": 1,
  "direction": "sample string 3",
  "has_correspondence": true,
  "active": true,
  "badge_reader_type_id": "3ad51b24-a5e6-4576-a5ec-24bd93b3b033",
  "site_id": "0198b49f-a8dc-4e60-b19b-ce6de3f67378",
  "parity": 6,
  "data_bits": 7,
  "stop_bits": 8,
  "handshake": 9
}

application/xml, text/xml

Sample:
<badgereader xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <badge_reader_type_id>3ad51b24-a5e6-4576-a5ec-24bd93b3b033</badge_reader_type_id>
  <baudrate>1</baudrate>
  <com_port>1</com_port>
  <data_bits>7</data_bits>
  <direction>sample string 3</direction>
  <handshake>9</handshake>
  <has_correspondence>true</has_correspondence>
  <id>5327f781-d8d9-4075-b543-3fae5b94c90a</id>
  <name>sample string 2</name>
  <parity>6</parity>
  <pc_id>9297a59e-e728-476d-8059-257ac35c82af</pc_id>
  <site_id>0198b49f-a8dc-4e60-b19b-ce6de3f67378</site_id>
  <stop_bits>8</stop_bits>
</badgereader>

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 'BadgeReaderViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"dbcf0f85-c78e-41d0-a13d-18efca979d26"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">dbcf0f85-c78e-41d0-a13d-18efca979d26</guid>