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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

PCViewModel
NameDescriptionTypeAdditional information
active

boolean

Required

cleanroom_id

globally unique identifier

None.

db_login

string

String length: inclusive between 0 and 50

db_name

string

String length: inclusive between 0 and 50

db_password

string

String length: inclusive between 0 and 50

db_source

string

String length: inclusive between 0 and 50

id

globally unique identifier

None.

local_ip

string

String length: inclusive between 0 and 15

lock_id

globally unique identifier

None.

mac_address

string

Required

String length: inclusive between 0 and 30

name

string

String length: inclusive between 0 and 100

pc_type_id

globally unique identifier

None.

rights

Collection of ShortRightViewModel

None.

site_id

globally unique identifier

None.

zone_id

globally unique identifier

None.

Request Formats

application/json, text/json

Sample:
{
  "active": true,
  "cleanroom_id": "9257340b-8e0b-483a-b2ec-36720b516b04",
  "db_login": "sample string 2",
  "db_name": "sample string 3",
  "db_password": "sample string 4",
  "db_source": "sample string 5",
  "id": "cb85dcc6-8d38-4a16-bdc5-85099e3e6ed5",
  "local_ip": "sample string 7",
  "lock_id": "546ab6ae-e3d8-4f66-8e03-1fb0516bc9a0",
  "mac_address": "sample string 8",
  "name": "sample string 9",
  "pc_type_id": "9d5cf8cb-52b3-4e28-9bc7-f15a6fd888ec",
  "rights": [
    {
      "code": "sample string 1",
      "id": "bab95a48-3b67-49a2-856a-8f2eabae5271"
    },
    {
      "code": "sample string 1",
      "id": "bab95a48-3b67-49a2-856a-8f2eabae5271"
    }
  ],
  "site_id": "8bff2798-d415-45eb-981d-d1d834bb43be",
  "zone_id": "2b9ca5fb-033f-4ff7-999e-fbfabb5cbc3e"
}

application/xml, text/xml

Sample:
<pc xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <cleanroom_id>9257340b-8e0b-483a-b2ec-36720b516b04</cleanroom_id>
  <db_login>sample string 2</db_login>
  <db_name>sample string 3</db_name>
  <db_password>sample string 4</db_password>
  <db_source>sample string 5</db_source>
  <id>cb85dcc6-8d38-4a16-bdc5-85099e3e6ed5</id>
  <local_ip>sample string 7</local_ip>
  <lock_id>546ab6ae-e3d8-4f66-8e03-1fb0516bc9a0</lock_id>
  <mac_address>sample string 8</mac_address>
  <name>sample string 9</name>
  <pc_type_id>9d5cf8cb-52b3-4e28-9bc7-f15a6fd888ec</pc_type_id>
  <rights>
    <right>
      <ID>bab95a48-3b67-49a2-856a-8f2eabae5271</ID>
      <code>sample string 1</code>
    </right>
    <right>
      <ID>bab95a48-3b67-49a2-856a-8f2eabae5271</ID>
      <code>sample string 1</code>
    </right>
  </rights>
  <site_id>8bff2798-d415-45eb-981d-d1d834bb43be</site_id>
  <zone_id>2b9ca5fb-033f-4ff7-999e-fbfabb5cbc3e</zone_id>
</pc>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"da9328db-1cff-43e5-a2c9-780f55704f40"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">da9328db-1cff-43e5-a2c9-780f55704f40</guid>