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": "cb5f933d-4b22-4e83-ab22-9d1abbf73ecd",
  "db_login": "sample string 2",
  "db_name": "sample string 3",
  "db_password": "sample string 4",
  "db_source": "sample string 5",
  "id": "0a571780-0bed-4d8c-91f6-1344aef88ad9",
  "local_ip": "sample string 7",
  "lock_id": "a90e071b-4992-4363-831c-4497a91f7acb",
  "mac_address": "sample string 8",
  "name": "sample string 9",
  "pc_type_id": "8ceaa6d2-9028-4646-91ae-f4fcbde8e0a2",
  "rights": [
    {
      "code": "sample string 1",
      "id": "2005af8a-c127-4c83-8866-0afdbfe253ea"
    },
    {
      "code": "sample string 1",
      "id": "2005af8a-c127-4c83-8866-0afdbfe253ea"
    }
  ],
  "site_id": "8564a518-9e09-448b-959a-a21b8a6fa6a1",
  "zone_id": "a2d22545-b168-43c8-87db-02b8303957f2"
}

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>cb5f933d-4b22-4e83-ab22-9d1abbf73ecd</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>0a571780-0bed-4d8c-91f6-1344aef88ad9</id>
  <local_ip>sample string 7</local_ip>
  <lock_id>a90e071b-4992-4363-831c-4497a91f7acb</lock_id>
  <mac_address>sample string 8</mac_address>
  <name>sample string 9</name>
  <pc_type_id>8ceaa6d2-9028-4646-91ae-f4fcbde8e0a2</pc_type_id>
  <rights>
    <right>
      <ID>2005af8a-c127-4c83-8866-0afdbfe253ea</ID>
      <code>sample string 1</code>
    </right>
    <right>
      <ID>2005af8a-c127-4c83-8866-0afdbfe253ea</ID>
      <code>sample string 1</code>
    </right>
  </rights>
  <site_id>8564a518-9e09-448b-959a-a21b8a6fa6a1</site_id>
  <zone_id>a2d22545-b168-43c8-87db-02b8303957f2</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:
"94ac9b26-4746-4e84-a803-822380beac20"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">94ac9b26-4746-4e84-a803-822380beac20</guid>