API Module Nameserver modifyZoneDnsRequest
From Openprovider API documentation
(Difference between revisions)
(→Raw XML) |
(→Raw XML) |
||
| (8 intermediate revisions not shown) | |||
| Line 9: | Line 9: | ||
|- | |- | ||
|'''Use''' | |'''Use''' | ||
| - | |Modifies | + | |Modifies DNS zone object |
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|'''Input''' | |'''Input''' | ||
| | | | ||
*'''[[API Format Domain|domain]]''' | *'''[[API Format Domain|domain]]''' | ||
| - | |||
*masterIp (required for slave dns zones) | *masterIp (required for slave dns zones) | ||
*[[API Format Records|records]] (required for master dns zones) | *[[API Format Records|records]] (required for master dns zones) | ||
| + | *isSpamexpertsEnabled ''(to enable spam filtering by default on this DNS zone, default value: 0)'' | ||
| + | *secured (''0'' or ''1'', default value is ''0'') - is needed to create DNSSEC keys for zone | ||
| + | *provider (''openprovider'' or ''sectigo'', default value is ''openprovider'') - in case you have a premium DNS zone, parameter has to be specified to operate over it | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|'''Output''' | |'''Output''' | ||
| Line 36: | Line 38: | ||
array( | array( | ||
'type' => 'A', | 'type' => 'A', | ||
| - | 'name' => | + | 'name' => "", |
'value' => '89.255.0.43', | 'value' => '89.255.0.43', | ||
'ttl' => 86400 | 'ttl' => 86400 | ||
| Line 48: | Line 50: | ||
array( | array( | ||
'type' => 'MX', | 'type' => 'MX', | ||
| - | 'name' => | + | 'name' => "", |
'value' => 'mail.openprovider.eu', | 'value' => 'mail.openprovider.eu', | ||
'prio' => 10, | 'prio' => 10, | ||
| Line 57: | Line 59: | ||
===Raw XML=== | ===Raw XML=== | ||
| + | ''Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.'' | ||
| + | ''You need to send all the DNS records, even if you are modifying a single record. So please take a backup before sending the request.'' | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<openXML> | <openXML> | ||
| Line 91: | Line 95: | ||
</array> | </array> | ||
</records> | </records> | ||
| - | </ | + | </modifyZoneDnsRequest> |
</openXML> | </openXML> | ||
Current revision as of 04:48, 17 March 2026
Contents |
Module DNS zone > Modify
| Module | DNS zone |
| Command name | modifyZoneDnsRequest |
| Use | Modifies DNS zone object |
| Input |
|
| Output |
- |
Examples
Using PHP class
$request = new OP_Request;
$request->setCommand('modifyZoneDnsRequest')
->setAuth(array('username' => 'username', 'password' => 'password'))
->setArgs(array(
'domain' => array(
'name' => 'demozone',
'extension' => 'com'
),
'records' => array(
array(
'type' => 'A',
'name' => "",
'value' => '89.255.0.43',
'ttl' => 86400
),
array(
'type' => 'A',
'name' => '*',
'value' => '89.255.0.43',
'ttl' => 86400
),
array(
'type' => 'MX',
'name' => "",
'value' => 'mail.openprovider.eu',
'prio' => 10,
'ttl' => 86400
)
)
));
Raw XML
Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider. You need to send all the DNS records, even if you are modifying a single record. So please take a backup before sending the request.
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<credentials>
<username>username</username>
<password>password</password>
</credentials>
<modifyZoneDnsRequest>
<domain>
<name>demozone</name>
<extension>com</extension>
</domain>
<records>
<array>
<item>
<type>A</type>
<name></name>
<value>89.255.0.43</value>
<ttl>86400</ttl>
</item>
<item>
<type>A</type>
<name>*</name>
<value>89.255.0.43</value>
<ttl>86400</ttl>
</item>
<item>
<type>MX</type>
<name></name>
<value>mail.openprovider.eu</value>
<prio>10</prio>
<ttl>86400</ttl>
</item>
</array>
</records>
</modifyZoneDnsRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
<reply>
<code>0</code>
<desc></desc>
<data>1</data>
</reply>
</openXML>