API Module Nameserver searchZoneRecordDnsRequest
From Openprovider API documentation
(Difference between revisions)
(Created page with '==Module DNS zone > Retrieve== {| border="1" cellpadding="4" |- style="background-color:#BBBBBB;" |'''Module''' |DNS zone |- style="background-color:#EEEEEE;" |'''Command name'''…') |
|||
| (12 intermediate revisions not shown) | |||
| Line 6: | Line 6: | ||
|- style="background-color:#EEEEEE;" | |- style="background-color:#EEEEEE;" | ||
|'''Command name''' | |'''Command name''' | ||
| - | | | + | |searchZoneRecordDnsRequest |
|- | |- | ||
|'''Use''' | |'''Use''' | ||
| Line 14: | Line 14: | ||
| | | | ||
*'''name''' | *'''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) | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|'''Output''' | |'''Output''' | ||
| | | | ||
| - | + | *[[API Format Records|results]] | |
| - | + | *total | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | *[[API Format Records| | + | |
| - | + | ||
| - | * | + | |
|} | |} | ||
| Line 32: | Line 27: | ||
===Using PHP class=== | ===Using PHP class=== | ||
$request = new OP_Request; | $request = new OP_Request; | ||
| - | $request->setCommand(' | + | $request->setCommand('searchZoneRecordDnsRequest') |
->setAuth(array('username' => 'username', 'password' => 'password')) | ->setAuth(array('username' => 'username', 'password' => 'password')) | ||
->setArgs(array( | ->setArgs(array( | ||
'name' => 'demozone.com', | 'name' => 'demozone.com', | ||
| - | ' | + | 'offset' => 5, |
| - | ' | + | 'limit' => 3, |
| + | 'orderBy' => 'name', | ||
)); | )); | ||
| Line 48: | Line 44: | ||
<password>password</password> | <password>password</password> | ||
</credentials> | </credentials> | ||
| - | < | + | <searchZoneRecordDnsRequest> |
<name>demozone.com</name> | <name>demozone.com</name> | ||
| - | < | + | <offset>5</offset> |
| - | </ | + | <limit>3</limit> |
| + | <orderBy>name</orderBy> | ||
| + | </searchZoneRecordDnsRequest> | ||
</openXML> | </openXML> | ||
| Line 57: | Line 55: | ||
<openXML> | <openXML> | ||
<reply> | <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> | </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 |
|
| 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>