Add record

dnsAddRecord

Purpose

Add new record into DNS zone.

Attributes

  • domainid - Domain ID OR
  • domain - The domain name
send domain id *or* domain
  • name - The record name
  • type - The DNS record type (SOA, NS, A, AAAA, CNAME, MX, TXT, SRV)
  • content - Record value - base64_encode
  • prio - The record's preference
  • ttl - The record's Time To Live

Example Command

$postfields = array();
$postfields["responsetype"] = "json";

$postfields["action"] = "dnsAddRecord";
$postfields['domain'] = 'domain.hu';
$postfields['name'] = 'teszt.domain.hu';
$postfields['type'] = 'A';
$postfields['content'] = '192.168.1.1';
$postfields['ttl'] = '3600';

$result = mikrovps_SendCommand( $postfields );

Successful Response

Array
(
    [status] => success
    [code] => RECORD_ADDED
    [value] => domain.hu
    [description] => Record has been added to: domain.hu
)

Error Response

result = error
code = XXX
description = YYY
Error code and message
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Artículos Relacionados

Retrieve full zone

dnsGetZone Purpose   Attributes domainid - Domain ID OR domain - The domain name send...

Edit record

dnsEditRecord Purpose Edit existing DNS record into zone. Attributes domainid - Domain ID...

Delete record

dnsDeleteRecord Purpose Delete DNS record from zone. Attributes domainid - Domain ID OR...