POST api/Circuit

Add new circuit

Request Information

URI Parameters

None.

Body Parameters

The circuit to add

Circuit
NameDescriptionTypeAdditional information
CircuitID

Unique ID of Circuit

integer

None.

CircuitName

Name of Circuit

string

String length: inclusive between 0 and 50

ParentCircuitID

CircuitId of this circuit's parent in the circuit hierarchy. An ID of -1 is used for no parent circuit.

integer

None.

FullAddress

Full site address for this circuit

string

String length: inclusive between 0 and 8000

Postcode

Postcode of the site for this circuit

string

String length: inclusive between 0 and 20

PrimaryContactName

Name of the primary contact for this circuit

string

String length: inclusive between 0 and 100

PrimaryContactEmail

Email address of the primary contact for this circuit

string

String length: inclusive between 0 and 100

PrimaryContactPhone

Phone number of the primary contact for this circuit

string

String length: inclusive between 0 and 20

SecondaryContactName

Name of the secondary contact for this circuit

string

String length: inclusive between 0 and 100

SecondaryContactEmail

Email address of the secondary contact for this circuit

string

String length: inclusive between 0 and 100

SecondaryContactPhone

Phone number of the secondary contact for this circuit

string

String length: inclusive between 0 and 20

Request Formats

application/json, text/json

Sample:
{
  "CircuitID": 1,
  "CircuitName": "sample string 2",
  "ParentCircuitID": 3,
  "FullAddress": "sample string 4",
  "Postcode": "sample string 5",
  "PrimaryContactName": "sample string 6",
  "PrimaryContactEmail": "sample string 7",
  "PrimaryContactPhone": "sample string 8",
  "SecondaryContactName": "sample string 9",
  "SecondaryContactEmail": "sample string 10",
  "SecondaryContactPhone": "sample string 11"
}

application/xml, text/xml

Sample:
<Circuit xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CircuitID>1</CircuitID>
  <CircuitName>sample string 2</CircuitName>
  <ParentCircuitID>3</ParentCircuitID>
  <FullAddress>sample string 4</FullAddress>
  <Postcode>sample string 5</Postcode>
  <PrimaryContactName>sample string 6</PrimaryContactName>
  <PrimaryContactEmail>sample string 7</PrimaryContactEmail>
  <PrimaryContactPhone>sample string 8</PrimaryContactPhone>
  <SecondaryContactName>sample string 9</SecondaryContactName>
  <SecondaryContactEmail>sample string 10</SecondaryContactEmail>
  <SecondaryContactPhone>sample string 11</SecondaryContactPhone>
</Circuit>

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

Response Information

Resource Description

Returns the newly inserted CircuitId

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<long>1</long>