POST api/badgereaderapi/add?siteId={siteId}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| siteId | globally unique identifier |
None. |
Body Parameters
BadgeReaderViewModel| Name | Description | Type | Additional 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": "9f05949d-5d87-49f1-9e3a-5439739b6b67",
"name": "sample string 2",
"pc_id": "de2f8609-a132-4c7d-91fb-007b602adc2b",
"com_port": 1,
"baudrate": 1,
"direction": "sample string 3",
"has_correspondence": true,
"active": true,
"badge_reader_type_id": "a711a98a-4be3-420f-b0c3-83b22f4faf1e",
"site_id": "e5abd86e-f8e6-4186-89a2-c60b8a16d9c8",
"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>a711a98a-4be3-420f-b0c3-83b22f4faf1e</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>9f05949d-5d87-49f1-9e3a-5439739b6b67</id> <name>sample string 2</name> <parity>6</parity> <pc_id>de2f8609-a132-4c7d-91fb-007b602adc2b</pc_id> <site_id>e5abd86e-f8e6-4186-89a2-c60b8a16d9c8</site_id> <stop_bits>8</stop_bits> </badgereader>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
globally unique identifierResponse Formats
application/json, text/json
Sample:
"47ddb0f4-c9d3-43bd-99d0-850efd96b76c"
application/xml, text/xml
Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">47ddb0f4-c9d3-43bd-99d0-850efd96b76c</guid>