POST api/srs/domain

Creates a domain to a specific registry.

Request Information

URI Parameters

None.

Body Parameters

SrsDomainCreateParams
NameDescriptionTypeAdditional information
AdminContactId

string

Required

BillingContactId

string

Required

RegistrantContactId

string

Required

TechContactId

string

Required

DomainName

string

Required

Period

integer

Required

Range: inclusive between 1 and 32767

RegistryId

string

Required

Status

string

None.

Uin

string

None.

UseProxy

boolean

None.

NameServer

Collection of string

Required

Max length: 6

Min length: 2

EnsId

string

None.

EnsPassword

string

None.

Request Formats

application/json, text/json

Sample:
{
  "AdminContactId": "sample string 1",
  "BillingContactId": "sample string 2",
  "RegistrantContactId": "sample string 3",
  "TechContactId": "sample string 4",
  "DomainName": "sample string 5",
  "Period": 6,
  "RegistryId": "sample string 7",
  "Status": "sample string 8",
  "Uin": "sample string 9",
  "UseProxy": true,
  "NameServer": [
    "sample string 1",
    "sample string 2"
  ],
  "EnsId": "sample string 10",
  "EnsPassword": "sample string 11"
}

application/xml, text/xml

Sample:
<SrsDomainCreateParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.SrsParams">
  <AdminContactId>sample string 1</AdminContactId>
  <BillingContactId>sample string 2</BillingContactId>
  <DomainName>sample string 5</DomainName>
  <EnsId>sample string 10</EnsId>
  <EnsPassword>sample string 11</EnsPassword>
  <NameServer xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </NameServer>
  <Period>6</Period>
  <RegistrantContactId>sample string 3</RegistrantContactId>
  <RegistryId>sample string 7</RegistryId>
  <Status>sample string 8</Status>
  <TechContactId>sample string 4</TechContactId>
  <Uin>sample string 9</Uin>
  <UseProxy>true</UseProxy>
</SrsDomainCreateParams>

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

Response Information

Resource Description

SrsRestResponse
NameDescriptionTypeAdditional information
XmlStatusCode

The legacy status codes as found in Interface.cs

integer

None.

Values

Additional values

Collection of string

None.

ResponseData

The response data of a successful SRS call

Collection of Object

None.

Response Formats

application/json, text/json

Sample:
{
  "XmlStatusCode": 1,
  "Values": [
    "sample string 1",
    "sample string 2"
  ],
  "ResponseData": null
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'Newtonsoft.Json.Linq.JToken' is a recursive collection data contract which is not supported. Consider modifying the definition of collection 'Newtonsoft.Json.Linq.JToken' to remove references to itself.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'Newtonsoft.Json.Linq.JToken' is a recursive collection data contract which is not supported. Consider modifying the definition of collection 'Newtonsoft.Json.Linq.JToken' to remove references to itself.