WAPI – command dns-add-row

  WAPI (API interface), WDNS

Adds a new DNS record for the domain

Parameters

  • domain = domain name – required
  • name = name of the record – required
  • ttl = TTL value – required
  • type = record type – required
  • rdata = data of the record – required
  • auth_comment = comment (not required)

Return Values

  • 1000 = ok
  • 2201 = unsupported TLD
  • 2202 = invalid or unsupported domain name
  • 2309 = invalid record type
  • 2310 = unable to add another record to the domain
  • 2311 = invalid name
  • 2312 = invalid name for that type of the record
  • 2313 = invalid CNAME for this name
  • 2314 = invalid data of the record
  • 2315 = invalid TLD
  • 2316 = this record already exists
  • 2317 = invalid TTL
  • 2318 = action can not be performed on the secondary domain type
  • 3222 = opening of the domain failed
  • 3223 = access denied
  • 3305 = domain is locked for editing
  • 3306 = domain is deleted

Return data

Command does not return any data

Příklad použití

XML query:

<request>
 <user>tester</user>
 <auth>8b91c1b94fd9a4488dc3d9160eebbf25c0b2a03f</auth>
 <command>dns-row-add</command>
 <data>
  <domain>example.cz</domain>
  <name>www</name>
  <ttl>1601</ttl>
  <type>A</type>
  <rdata>5.6.7.8</rdata>
 </data>
</request>

XML response:

<response>
 <code>1000</code>
 <result>OK</result>
 <timestamp>1291210501</timestamp>
 <svTRID>1291210501.7672.19698.1</svTRID>
 <command>dns-row-add</command>
</response>