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": "5af8a47c-0aa5-442d-99df-978a608cac97",
  "db_login": "sample string 2",
  "db_name": "sample string 3",
  "db_password": "sample string 4",
  "db_source": "sample string 5",
  "id": "cda3b05a-db90-43c8-a5b0-9c6b0e0f3d7f",
  "local_ip": "sample string 7",
  "lock_id": "7b54ae10-6fcf-47cc-8723-5a792b920293",
  "mac_address": "sample string 8",
  "name": "sample string 9",
  "pc_type_id": "99da89d3-e0aa-4674-b5d2-27d8730bbf45",
  "rights": [
    {
      "code": "sample string 1",
      "id": "95cbdb7f-48f9-4473-85a5-6a5f95719b0a"
    },
    {
      "code": "sample string 1",
      "id": "95cbdb7f-48f9-4473-85a5-6a5f95719b0a"
    }
  ],
  "site_id": "942ff05e-950e-43e2-9fdf-06422f6edb6b",
  "zone_id": "c099ff68-b52a-40a4-bf0c-25cea6f356ac"
}

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>5af8a47c-0aa5-442d-99df-978a608cac97</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>cda3b05a-db90-43c8-a5b0-9c6b0e0f3d7f</id>
  <local_ip>sample string 7</local_ip>
  <lock_id>7b54ae10-6fcf-47cc-8723-5a792b920293</lock_id>
  <mac_address>sample string 8</mac_address>
  <name>sample string 9</name>
  <pc_type_id>99da89d3-e0aa-4674-b5d2-27d8730bbf45</pc_type_id>
  <rights>
    <right>
      <ID>95cbdb7f-48f9-4473-85a5-6a5f95719b0a</ID>
      <code>sample string 1</code>
    </right>
    <right>
      <ID>95cbdb7f-48f9-4473-85a5-6a5f95719b0a</ID>
      <code>sample string 1</code>
    </right>
  </rights>
  <site_id>942ff05e-950e-43e2-9fdf-06422f6edb6b</site_id>
  <zone_id>c099ff68-b52a-40a4-bf0c-25cea6f356ac</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:
"acf4e8d1-fa49-4c7e-8b29-97292765311f"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">acf4e8d1-fa49-4c7e-8b29-97292765311f</guid>