API Module Nameserver retrieveZoneDnsRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Created page with '==Module DNS zone > Retrieve== {| border="1" cellpadding="4" |- style="background-color:#BBBBBB;" |'''Module''' |DNS zone |- style="background-color:#EEEEEE;" |'''Command name'''…')
 
(9 intermediate revisions not shown)
Line 9: Line 9:
|-
|-
|'''Use'''
|'''Use'''
-
|Retrieves information about an existing DNS zone object
+
|Retrieves information about an existing DNS zone object.
|- style="vertical-align:top;"
|- style="vertical-align:top;"
|'''Input'''
|'''Input'''
|
|
*'''name'''
*'''name'''
-
*withRecords
+
*withRecords -  If you need to get all records of the DNS zone, better to use [[API Module Nameserver searchZoneRecordDnsRequest|searchZoneRecordDnsRequest]]
*withHistory
*withHistory
 +
*provider (''openprovider'' or ''sectigo'', default value is ''openprovider'') - in case you have a premium DNS zone, parameter has to be specified to retrieve it
|- style="vertical-align:top;"
|- style="vertical-align:top;"
|'''Output'''
|'''Output'''
|
|
-
*type
+
*type (master or slave)
*name
*name
*ip
*ip
*creationDate
*creationDate
*modificationDate
*modificationDate
-
*[[API Format Records|records]] (if withRecords = true)
+
*[[API Format Records|records]] (if withRecords = 1)
-
*[[API Format DNS History|history]] (if withHistory = true)
+
*[[API Format DNS History|history]] (if withHistory = 1)
 +
*withDnskey (''0'' or ''1'', default value is ''0'')
|}
|}
Line 35: Line 37:
   ->setArgs(array(
   ->setArgs(array(
     'name' => 'demozone.com',
     'name' => 'demozone.com',
-
     'withRecords' => true,
+
     'withRecords' => 1,
-
     'withHistory' => true
+
     'withHistory' => 1
   ));
   ));
===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.''
  <?xml version="1.0" encoding="UTF-8"?>
  <?xml version="1.0" encoding="UTF-8"?>
  <openXML>
  <openXML>
Line 55: Line 58:
  <openXML>
  <openXML>
   <reply>
   <reply>
-
     < code>0</code>
+
     <nowiki><code>0</code></nowiki>
     <desc></desc>
     <desc></desc>
     <data>
     <data>
Line 68: Line 71:
         <array>
         <array>
           <item>
           <item>
-
            <id>603319</id>
 
             <name>*.demozone.com</name>
             <name>*.demozone.com</name>
             <type>A</type>
             <type>A</type>
Line 78: Line 80:
           </item>
           </item>
           <item>
           <item>
-
            <id>603318</id>
 
             <name>demozone.com</name>
             <name>demozone.com</name>
             <type>A</type>
             <type>A</type>
Line 88: Line 89:
           </item>
           </item>
           <item>
           <item>
-
            <id>603320</id>
 
             <name>demozone.com</name>
             <name>demozone.com</name>
             <type>MX</type>
             <type>MX</type>
Line 98: Line 98:
           </item>
           </item>
           <item>
           <item>
-
            <id>603321</id>
 
             <name>demozone.com</name>
             <name>demozone.com</name>
             <type>NS</type>
             <type>NS</type>
Line 108: Line 107:
           </item>
           </item>
           <item>
           <item>
-
            <id>603322</id>
 
             <name>demozone.com</name>
             <name>demozone.com</name>
             <type>NS</type>
             <type>NS</type>
Line 118: Line 116:
           </item>
           </item>
           <item>
           <item>
-
            <id>603323</id>
 
             <name>demozone.com</name>
             <name>demozone.com</name>
             <type>NS</type>
             <type>NS</type>
Line 128: Line 125:
           </item>
           </item>
           <item>
           <item>
-
            <id>603324</id>
 
             <name>demozone.com</name>
             <name>demozone.com</name>
             <type>SOA</type>
             <type>SOA</type>

Current revision as of 03:13, 9 September 2021

Contents

Module DNS zone > Retrieve

Module DNS zone
Command name retrieveZoneDnsRequest
Use Retrieves information about an existing DNS zone object.
Input
  • name
  • withRecords - If you need to get all records of the DNS zone, better to use searchZoneRecordDnsRequest
  • withHistory
  • provider (openprovider or sectigo, default value is openprovider) - in case you have a premium DNS zone, parameter has to be specified to retrieve it
Output
  • type (master or slave)
  • name
  • ip
  • creationDate
  • modificationDate
  • records (if withRecords = 1)
  • history (if withHistory = 1)
  • withDnskey (0 or 1, default value is 0)

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('retrieveZoneDnsRequest')
  ->setAuth(array('username' => 'username', 'password' => 'password'))
  ->setArgs(array(
    'name' => 'demozone.com',
    'withRecords' => 1,
    'withHistory' => 1
  ));

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.

<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <credentials>
    <username>username</username>
    <password>password</password>
  </credentials>
  <retrieveZoneDnsRequest>
    <name>demozone.com</name>
    <withRecords>1</withRecords>
  </retrieveZoneDnsRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    <code>0</code>
    <desc></desc>
    <data>
      <id>48890</id>
      <type>master</type>
      <name>demozone.com</name>
      <ip>com.demozone</ip>
      <active>1</active>
      <creationDate>2010-07-13 17:07:22</creationDate>
      <modificationDate>2010-07-13 17:07:22</modificationDate>
      <records>
        <array>
          <item>
            <name>*.demozone.com</name>
            <type>A</type>
            <value>89.255.0.43</value>
            <prio></prio>
            <ttl>86400</ttl>
            <creationDate>2010-07-13 17:07:22</creationDate>
            <modificationDate>2010-07-13 17:07:22</modificationDate>
          </item>
          <item>
            <name>demozone.com</name>
            <type>A</type>
            <value>89.255.0.43</value>
            <prio></prio>
            <ttl>86400</ttl>
            <creationDate>2010-07-13 17:07:22</creationDate>
            <modificationDate>2010-07-13 17:07:22</modificationDate>
          </item>
          <item>
            <name>demozone.com</name>
            <type>MX</type>
            <value>mail.openprovider.eu</value>
            <prio>10</prio>
            <ttl>86400</ttl>
            <creationDate>2010-07-13 17:07:22</creationDate>
            <modificationDate>2010-07-13 17:07:22</modificationDate>
          </item>
          <item>
            <name>demozone.com</name>
            <type>NS</type>
            <value>ns3.openprovider.eu</value>
            <prio></prio>
            <ttl>86400</ttl>
            <creationDate>2010-07-13 17:07:22</creationDate>
            <modificationDate>2010-07-13 17:07:22</modificationDate>
          </item>
          <item>
            <name>demozone.com</name>
            <type>NS</type>
            <value>ns1.openprovider.nl</value>
            <prio></prio>
            <ttl>86400</ttl>
            <creationDate>2010-07-13 17:07:22</creationDate>
            <modificationDate>2010-07-13 17:07:22</modificationDate>
          </item>
          <item>
            <name>demozone.com</name>
            <type>NS</type>
            <value>ns2.openprovider.be</value>
            <prio></prio>
            <ttl>86400</ttl>
            <creationDate>2010-07-13 17:07:22</creationDate>
            <modificationDate>2010-07-13 17:07:22</modificationDate>
          </item>
          <item>
            <name>demozone.com</name>
            <type>SOA</type>
            <value>ns1.openprovider.nl dns@openprovider.eu 2010071300</value>
            <prio></prio>
            <ttl>86400</ttl>
            <creationDate>2010-07-13 17:07:22</creationDate>
            <modificationDate>2010-07-13 17:07:22</modificationDate>
          </item>
        </array>
      </records>
      <history>
        <array>
          <item>
            <date>2010-07-13 17:07:22</date>
            <is>+ A |demozone.com | 89.255.0.43</is>
            <was></was>
          </item>
          <item>
            <date>2010-07-13 17:07:22</date>
            <is>+ A |*.demozone.com | 89.255.0.43</is>
            <was></was>
          </item>
          <item>
            <date>2010-07-13 17:07:22</date>
            <is>+ MX |demozone.com | mail.openprovider.eu</is>
            <was></was>
          </item>
          <item>
            <date>2010-07-13 17:07:22</date>
            <is>+ NS |demozone.com | ns3.openprovider.eu</is>
            <was></was>
          </item>
          <item>
            <date>2010-07-13 17:07:22</date>
            <is>+ NS |demozone.com | ns1.openprovider.nl</is>
            <was></was>
          </item>
          <item>
            <date>2010-07-13 17:07:22</date>
            <is>+ NS |demozone.com | ns2.openprovider.be</is>
            <was></was>
          </item>
          <item>
            <date>2010-07-13 17:07:22</date>
            <is>+ SOA |demozone.com | ns1.openprovider.nl dns@openprovider.eu 2010071300</is>
            <was></was>
          </item>
        </array>
      </history>
    </data>
  </reply>
</openXML>
Views
Personal tools