API Module Nameserver searchZoneRecordDnsRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Using PHP class)
 
(7 intermediate revisions not shown)
Line 14: Line 14:
|
|
*'''name'''
*'''name'''
-
*limit - How many records to retrieve (default: 100, max 1000)
+
*limit - How many records to retrieve (default: 100, max 500)
*offset - From which record to retrieve (default: 0)
*offset - From which record to retrieve (default: 0)
*orderBy - Sorting, allowed by fields - type, name, value, ttl, prio (default: type: asc, name: asc)
*orderBy - Sorting, allowed by fields - type, name, value, ttl, prio (default: type: asc, name: asc)
Line 32: Line 32:
     'name' => 'demozone.com',
     'name' => 'demozone.com',
     'offset' => 5,
     'offset' => 5,
-
     'limit' => 10,
+
     'limit' => 3,
     'orderBy' => 'name',
     'orderBy' => 'name',
   ));
   ));
Line 44: Line 44:
     <password>password</password>
     <password>password</password>
   </credentials>
   </credentials>
-
   <retrieveZoneDnsRequest>
+
   <searchZoneRecordDnsRequest>
     <name>demozone.com</name>
     <name>demozone.com</name>
-
     <withRecords>1</withRecords>
+
     <offset>5</offset>
-
   </retrieveZoneDnsRequest>
+
    <limit>3</limit>
 +
    <orderBy>name</orderBy>
 +
   </searchZoneRecordDnsRequest>
  </openXML>
  </openXML>
Line 53: Line 55:
  <openXML>
  <openXML>
   <reply>
   <reply>
-
    <nowiki><code>0</code></nowiki>
+
  <desc></desc>
-
    <desc></desc>
+
  <data>
-
    <data>
+
    <results>
-
      <id>48890</id>
+
      <array>
-
      <type>master</type>
+
        <item>
-
      <name>demozone.com</name>
+
          <id>502647110</id>
-
      <ip>com.demozone</ip>
+
          <name>demozone.nl</name>
-
      <active>1</active>
+
          <type>MX</type>
-
      <creationDate>2010-07-13 17:07:22</creationDate>
+
          <value>123.demozone.nl</value>
-
      <modificationDate>2010-07-13 17:07:22</modificationDate>
+
          <prio>5</prio>
-
      <records>
+
          <ttl>86400</ttl>
-
        <array>
+
          <creationDate>2017-07-18 05:54:36</creationDate>
-
          <item>
+
          <modificationDate>2017-07-18 05:54:36</modificationDate>
-
            <id>603319</id>
+
        </item>
-
            <name>*.demozone.com</name>
+
        <item>
-
            <type>A</type>
+
          <id>529669018</id>
-
            <value>89.255.0.43</value>
+
          <name>demozone.nl</name>
-
            <prio></prio>
+
          <type>CNAME</type>
-
            <ttl>86400</ttl>
+
          <value>google.com</value>
-
            <creationDate>2010-07-13 17:07:22</creationDate>
+
          <prio>
-
            <modificationDate>2010-07-13 17:07:22</modificationDate>
+
          </prio>
-
          </item>
+
          <ttl>3600</ttl>
-
          <item>
+
          <creationDate>2017-09-14 10:09:09</creationDate>
-
            <id>603318</id>
+
          <modificationDate>2017-09-14 10:09:09</modificationDate>
-
            <name>demozone.com</name>
+
        </item>
-
            <type>A</type>
+
        <item>
-
            <value>89.255.0.43</value>
+
          <id>516713902</id>
-
            <prio></prio>
+
          <name>www.demozone.nl</name>
-
            <ttl>86400</ttl>
+
          <type>A</type>
-
            <creationDate>2010-07-13 17:07:22</creationDate>
+
          <value>8.8.8.8</value>
-
            <modificationDate>2010-07-13 17:07:22</modificationDate>
+
          <prio>
-
          </item>
+
          </prio>
-
          <item>
+
          <ttl>86400</ttl>
-
            <id>603320</id>
+
          <creationDate>2017-08-18 08:15:10</creationDate>
-
            <name>demozone.com</name>
+
          <modificationDate>2017-08-18 08:15:10</modificationDate>
-
            <type>MX</type>
+
        </item>
-
            <value>mail.openprovider.eu</value>
+
      </array>
-
            <prio>10</prio>
+
    </results>
-
            <ttl>86400</ttl>
+
    <total>12</total>
-
            <creationDate>2010-07-13 17:07:22</creationDate>
+
-
            <modificationDate>2010-07-13 17:07:22</modificationDate>
+
-
          </item>
+
-
          <item>
+
-
            <id>603321</id>
+
-
            <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>
     </data>
   </reply>
   </reply>
  </openXML>
  </openXML>

Current revision as of 03:17, 4 June 2019

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 500)
  • 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>
  <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