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": "75216d80-30f3-4ffa-860d-9d09817a39b9",
  "db_login": "sample string 2",
  "db_name": "sample string 3",
  "db_password": "sample string 4",
  "db_source": "sample string 5",
  "id": "627720bd-af4a-4d78-936c-20f795d90736",
  "local_ip": "sample string 7",
  "lock_id": "4c844ba7-f669-4f64-bdeb-727a92d146e5",
  "mac_address": "sample string 8",
  "name": "sample string 9",
  "pc_type_id": "8be59bd9-2df1-4920-90f9-afb4b1fbf38f",
  "rights": [
    {
      "code": "sample string 1",
      "id": "14495a4d-c471-4682-acbc-a5ff15c97bb2"
    },
    {
      "code": "sample string 1",
      "id": "14495a4d-c471-4682-acbc-a5ff15c97bb2"
    }
  ],
  "site_id": "284eed54-111f-430f-a8c5-6905a4c97155",
  "zone_id": "14dc44f8-f423-43b7-af5f-e0efa22cce45"
}

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>75216d80-30f3-4ffa-860d-9d09817a39b9</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>627720bd-af4a-4d78-936c-20f795d90736</id>
  <local_ip>sample string 7</local_ip>
  <lock_id>4c844ba7-f669-4f64-bdeb-727a92d146e5</lock_id>
  <mac_address>sample string 8</mac_address>
  <name>sample string 9</name>
  <pc_type_id>8be59bd9-2df1-4920-90f9-afb4b1fbf38f</pc_type_id>
  <rights>
    <right>
      <ID>14495a4d-c471-4682-acbc-a5ff15c97bb2</ID>
      <code>sample string 1</code>
    </right>
    <right>
      <ID>14495a4d-c471-4682-acbc-a5ff15c97bb2</ID>
      <code>sample string 1</code>
    </right>
  </rights>
  <site_id>284eed54-111f-430f-a8c5-6905a4c97155</site_id>
  <zone_id>14dc44f8-f423-43b7-af5f-e0efa22cce45</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:
"50759170-a0c5-4a2e-bf3a-f7f4c781083a"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">50759170-a0c5-4a2e-bf3a-f7f4c781083a</guid>