POST v1/accounts/{foreignaccountkey}/networks

Create a new AccountNetwork in the ApiAccount.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
foreignaccountkey

The Api Account to create the AccountNetwork on

string

Required

Body Parameters

The details of the AccountNetwork to be created

AccountNetwork
NameDescriptionTypeAdditional information
ForeignKey

The unique identifier for the network

string

Required

Matching regular expression pattern: ^[A-z0-9\s-\.]*$

Max length: 14

Description

Gets and sets an optional description for the network

string

None.

EmailContact

Gets an sets the email contact for the AccountNetwork. This may be optional depending on the integration.

string

None.

StartDate

Gets the date the network was created

date

None.

EndDate

Gets the data the network was terminated

date

None.

BillingCycleDay

Gets and sets the billing cycle day for the network. This is important when considering data controls. The billing cycle day is when all quotas are reset.

integer

None.

Status

StatusValues

None.

Version

The version of the AccountNetwork actor. Every time a change is made to the AccountNetwork its version is incremented.

integer

None.

ActorStatus

The AccountNetwork actor status. Every resource in the api is represented by an actor. The actor status represents the health of the resource. The ActorStatus can be one of the following values:-<br/> stable = 0 /* everything is ok */ pending = 1 /* an operation is long running */ stalled = 10 /* an unrecoverable error has occurred that will require support desk intervention */

ActorStatusValues

None.

ForeignAttributes

Gets and sets optional attributes that can be stored with the AccountNetwork

Dictionary of string [key] and string [value]

None.

Timezone

QuotaCycleTimeZones

None.

IsDaylightSavings

boolean

None.

UseCustomDNS

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "ForeignKey": "sample string 1",
  "Description": "sample string 2",
  "EmailContact": "sample string 3",
  "StartDate": "2024-04-20T06:10:53.9405447+00:00",
  "EndDate": "2024-04-20T06:10:53.9405447+00:00",
  "BillingCycleDay": 6,
  "Status": 0,
  "Version": 7,
  "ActorStatus": 0,
  "ForeignAttributes": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Timezone": 0,
  "IsDaylightSavings": true,
  "UseCustomDNS": true
}

application/xml, text/xml

Sample:
<AccountNetwork xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <ActorStatus>stable</ActorStatus>
  <BillingCycleDay>6</BillingCycleDay>
  <Description>sample string 2</Description>
  <EmailContact>sample string 3</EmailContact>
  <EndDate>2024-04-20T06:10:53.9405447+00:00</EndDate>
  <ForeignAttributes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </ForeignAttributes>
  <ForeignKey>sample string 1</ForeignKey>
  <IsDaylightSavings>true</IsDaylightSavings>
  <StartDate>2024-04-20T06:10:53.9405447+00:00</StartDate>
  <Status>pending</Status>
  <Timezone>GMT</Timezone>
  <UseCustomDNS>true</UseCustomDNS>
  <Version>7</Version>
</AccountNetwork>

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

Response Information

Resource Description

The newly createdAccountNetwork

PBPRReturnOfAccountNetwork
NameDescriptionTypeAdditional information
Data

AccountNetwork

None.

Success

Gets the success status of the API call

boolean

None.

Meta

Gets the optional meta-data

Dictionary of string [key] and string [value]

None.

Code

Get the http code of the API call e.g. 200, 202, 409

integer

None.

ErrorCode

Get the failure error code of the API call. This is available if Success is false

integer

None.

ErrorSubCode

Gets the error sub code if available

integer

None.

ErrorDescription

Gets a textual description of the error

string

None.

StatusUrl

Gets the status url for any ACCEPTed API commands. Any command (POST,DELETE,PATCh,PUT) to the API usually returns a 202 response code. The status of the command can be queried using the URL provided

string

None.

ContinuationToken

Gets the token to be used for paged queries

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Meta": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Code": 2,
  "ErrorCode": 3,
  "Data": {
    "ForeignKey": "sample string 1",
    "Description": "sample string 2",
    "EmailContact": "sample string 3",
    "StartDate": "2024-04-20T06:10:53.9405447+00:00",
    "EndDate": "2024-04-20T06:10:53.9405447+00:00",
    "BillingCycleDay": 6,
    "Status": 0,
    "Version": 7,
    "ActorStatus": 0,
    "ForeignAttributes": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "Timezone": 0,
    "IsDaylightSavings": true,
    "UseCustomDNS": true
  },
  "ErrorSubCode": 4,
  "ErrorDescription": "sample string 5",
  "StatusUrl": "sample string 6",
  "ContinuationToken": "sample string 7"
}

application/xml, text/xml

Sample:
<PBPRReturnOfAccountNetwork7NMnQmOk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <Code>2</Code>
  <ContinuationToken>sample string 7</ContinuationToken>
  <ErrorCode>3</ErrorCode>
  <ErrorDescription>sample string 5</ErrorDescription>
  <ErrorSubCode>4</ErrorSubCode>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <StatusUrl>sample string 6</StatusUrl>
  <Success>true</Success>
  <Data>
    <ActorStatus>stable</ActorStatus>
    <BillingCycleDay>6</BillingCycleDay>
    <Description>sample string 2</Description>
    <EmailContact>sample string 3</EmailContact>
    <EndDate>2024-04-20T06:10:53.9405447+00:00</EndDate>
    <ForeignAttributes xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </ForeignAttributes>
    <ForeignKey>sample string 1</ForeignKey>
    <IsDaylightSavings>true</IsDaylightSavings>
    <StartDate>2024-04-20T06:10:53.9405447+00:00</StartDate>
    <Status>pending</Status>
    <Timezone>GMT</Timezone>
    <UseCustomDNS>true</UseCustomDNS>
    <Version>7</Version>
  </Data>
</PBPRReturnOfAccountNetwork7NMnQmOk>