API Module Nameserver searchZoneRecordDnsRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Using PHP class)
(Raw XML)
Line 47: Line 47:
     <name>demozone.com</name>
     <name>demozone.com</name>
     <offset>5</offset>
     <offset>5</offset>
-
     <limit>10</limit>
+
     <limit>3</limit>
     <orderBy>name</orderBy>
     <orderBy>name</orderBy>
   </searchZoneRecordDnsRequest>
   </searchZoneRecordDnsRequest>
  </openXML>
  </openXML>
-
  <?xml version="1.0" encoding="UTF-8"?>
+
  ?xml version="1.0" encoding="UTF-8"?>
-
<openXML>
+
<openXML>
-
  <reply>
+
<reply>
-
    <nowiki><code>0</code></nowiki>
+
  <code>0</code>
-
    <desc></desc>
+
  <desc>
-
    <data>
+
  </desc>
-
      <id>48890</id>
+
  <data>
-
      <type>master</type>
+
    <results>
-
      <name>demozone.com</name>
+
      <array>
-
      <ip>com.demozone</ip>
+
        <item>
-
      <active>1</active>
+
          <id>502647110</id>
-
      <creationDate>2010-07-13 17:07:22</creationDate>
+
          <name>demozone.nl</name>
-
      <modificationDate>2010-07-13 17:07:22</modificationDate>
+
          <type>MX</type>
-
      <records>
+
          <value>123.demozone.nl</value>
-
        <array>
+
          <prio>5</prio>
-
          <item>
+
          <ttl>86400</ttl>
-
            <id>603319</id>
+
          <creationDate>2017-07-18 05:54:36</creationDate>
-
            <name>*.demozone.com</name>
+
          <modificationDate>2017-07-18 05:54:36</modificationDate>
-
            <type>A</type>
+
        </item>
-
            <value>89.255.0.43</value>
+
        <item>
-
            <prio></prio>
+
          <id>529669018</id>
-
            <ttl>86400</ttl>
+
          <name>demozone.nl</name>
-
            <creationDate>2010-07-13 17:07:22</creationDate>
+
          <type>CNAME</type>
-
            <modificationDate>2010-07-13 17:07:22</modificationDate>
+
          <value>google.com</value>
-
          </item>
+
          <prio>
-
          <item>
+
          </prio>
-
            <id>603318</id>
+
          <ttl>3600</ttl>
-
            <name>demozone.com</name>
+
          <creationDate>2017-09-14 10:09:09</creationDate>
-
            <type>A</type>
+
          <modificationDate>2017-09-14 10:09:09</modificationDate>
-
            <value>89.255.0.43</value>
+
        </item>
-
            <prio></prio>
+
        <item>
-
            <ttl>86400</ttl>
+
          <id>516713902</id>
-
            <creationDate>2010-07-13 17:07:22</creationDate>
+
          <name>www.demozone.nl</name>
-
            <modificationDate>2010-07-13 17:07:22</modificationDate>
+
          <type>A</type>
-
          </item>
+
          <value>8.8.8.8</value>
-
          <item>
+
          <prio>
-
            <id>603320</id>
+
          </prio>
-
            <name>demozone.com</name>
+
          <ttl>86400</ttl>
-
            <type>MX</type>
+
          <creationDate>2017-08-18 08:15:10</creationDate>
-
            <value>mail.openprovider.eu</value>
+
          <modificationDate>2017-08-18 08:15:10</modificationDate>
-
            <prio>10</prio>
+
        </item>
-
            <ttl>86400</ttl>
+
      </array>
-
            <creationDate>2010-07-13 17:07:22</creationDate>
+
    </results>
-
            <modificationDate>2010-07-13 17:07:22</modificationDate>
+
    <total>12</total>
-
          </item>
+
  </data>
-
          <item>
+
</reply>
-
            <id>603321</id>
+
</openXML>
-
            <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>
+
-
            <id>603322</id>
+
-
            <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>
+
-
            <id>603323</id>
+
-
            <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>
+
-
            <id>603324</id>
+
-
            <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>
+

Revision as of 09:15, 25 July 2018

Contents

Module DNS zone > Retrieve

Module DNS zone
Command name searchZoneRecordDnsRequest
Use Retrieves information about an existing DNS zone object
Input
  • name
  • limit - How many records to retrieve (default: 100, max 1000)
  • offset - From which record to retrieve (default: 0)
  • orderBy - Sorting, allowed by fields - type, name, value, ttl, prio (default: type: asc, name: asc)
Output

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('searchZoneRecordDnsRequest')
  ->setAuth(array('username' => 'username', 'password' => 'password'))
  ->setArgs(array(
    'name' => 'demozone.com',
    'offset' => 5,
    'limit' => 3,
    'orderBy' => 'name',
  ));

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>
  <searchZoneRecordDnsRequest>
    <name>demozone.com</name>
    <offset>5</offset>
    <limit>3</limit>
    <orderBy>name</orderBy>
  </searchZoneRecordDnsRequest>
</openXML>
?xml version="1.0" encoding="UTF-8"?>

<openXML> <reply>

 0
 <desc>
 </desc>
 <data>
   <results>
     <array>
       <item>
         <id>502647110</id>
         <name>demozone.nl</name>
         <type>MX</type>
         <value>123.demozone.nl</value>
         <prio>5</prio>
         <ttl>86400</ttl>
         <creationDate>2017-07-18 05:54:36</creationDate>
         <modificationDate>2017-07-18 05:54:36</modificationDate>
       </item>
       <item>
         <id>529669018</id>
         <name>demozone.nl</name>
         <type>CNAME</type>
         <value>google.com</value>
         <prio>
         </prio>
         <ttl>3600</ttl>
         <creationDate>2017-09-14 10:09:09</creationDate>
         <modificationDate>2017-09-14 10:09:09</modificationDate>
       </item>
       <item>
         <id>516713902</id>
         <name>www.demozone.nl</name>
         <type>A</type>
         <value>8.8.8.8</value>
         <prio>
         </prio>
         <ttl>86400</ttl>
         <creationDate>2017-08-18 08:15:10</creationDate>
         <modificationDate>2017-08-18 08:15:10</modificationDate>
       </item>
     </array>
   </results>
   <total>12</total>
 </data>

</reply> </openXML>

Views
Personal tools