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": "0c7b1e34-1a7b-4866-ab01-d0775ae8cceb",
  "db_login": "sample string 2",
  "db_name": "sample string 3",
  "db_password": "sample string 4",
  "db_source": "sample string 5",
  "id": "b5b4742b-6ae7-4e0b-9c67-813b020b1609",
  "local_ip": "sample string 7",
  "lock_id": "e0631b7c-dce0-4b38-9072-230ad61767f3",
  "mac_address": "sample string 8",
  "name": "sample string 9",
  "pc_type_id": "c8bbd321-4345-416c-8cee-48d58191bdab",
  "rights": [
    {
      "code": "sample string 1",
      "id": "8c246bbf-19c1-4a19-9873-8a02d2b8ac03"
    },
    {
      "code": "sample string 1",
      "id": "8c246bbf-19c1-4a19-9873-8a02d2b8ac03"
    }
  ],
  "site_id": "cadb25e3-0db8-4c87-8c58-0454bb0042ff",
  "zone_id": "3d59844e-6aab-4d95-8e6d-e741b62ea196"
}

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>0c7b1e34-1a7b-4866-ab01-d0775ae8cceb</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>b5b4742b-6ae7-4e0b-9c67-813b020b1609</id>
  <local_ip>sample string 7</local_ip>
  <lock_id>e0631b7c-dce0-4b38-9072-230ad61767f3</lock_id>
  <mac_address>sample string 8</mac_address>
  <name>sample string 9</name>
  <pc_type_id>c8bbd321-4345-416c-8cee-48d58191bdab</pc_type_id>
  <rights>
    <right>
      <ID>8c246bbf-19c1-4a19-9873-8a02d2b8ac03</ID>
      <code>sample string 1</code>
    </right>
    <right>
      <ID>8c246bbf-19c1-4a19-9873-8a02d2b8ac03</ID>
      <code>sample string 1</code>
    </right>
  </rights>
  <site_id>cadb25e3-0db8-4c87-8c58-0454bb0042ff</site_id>
  <zone_id>3d59844e-6aab-4d95-8e6d-e741b62ea196</zone_id>
</pc>

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

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"ba1b6495-0af7-4329-a101-2ae25f6c6aac"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">ba1b6495-0af7-4329-a101-2ae25f6c6aac</guid>