Difference between revisions of "Get Domain Info"
From Boxis.net API Docs
Line 3: | Line 3: | ||
With this command, you are able to viewing the domain details. | With this command, you are able to viewing the domain details. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === Output params | + | == Input params == |
+ | |||
+ | *'''version'''::String - ''API version (e.g. '1.0')'' | ||
+ | |||
+ | *'''timestamp'''::String - ''Sequence of characters, denoting the date and time (e.g '1336553826')'' | ||
+ | |||
+ | *'''username'''::String - ''User e-mail address (e.g 'mail1@example.com')'' | ||
+ | |||
+ | *'''authcode'''::String - '' md5 hash consisting of the concatenation of timestamp and user_key (e.g md5(1336553826BX3KwWU2SuqvoEWnjYmOibf'))'' | ||
+ | |||
+ | *'''section'''::String - ''API module name. Use 'domains' value | ||
+ | |||
+ | *'''action'''::String - ''API module function. Use 'getDomain' value | ||
+ | |||
+ | *'''domain'''::String - ''Domain name that you need to register'' | ||
+ | |||
+ | |||
+ | == Output params == | ||
==== Example in XML (Success) ==== | ==== Example in XML (Success) ==== | ||
Line 87: | Line 77: | ||
</pre> | </pre> | ||
− | ==== Example in | + | ==== Example in JSON (Success) ==== |
<pre> | <pre> | ||
Line 123: | Line 113: | ||
</pre> | </pre> | ||
− | ==== Example in | + | ==== Example in JSON (Error) ==== |
<pre> | <pre> | ||
Line 129: | Line 119: | ||
"resulttxt":"Error: {error description}", | "resulttxt":"Error: {error description}", | ||
"params":[],"timestamp":1335777400} | "params":[],"timestamp":1335777400} | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == Example using our PHP Class == | ||
+ | |||
+ | <pre> | ||
+ | /* API LOGIN DETAILS */ | ||
+ | $email = 'your@mail.com'; // your username | ||
+ | $apikey = '1234567890'; // your apikey | ||
+ | |||
+ | /* API COMMAND DETAILS */ | ||
+ | $apitype = 'domains'; | ||
+ | $command = 'getDomain'; | ||
+ | $params = array( | ||
+ | 'returntype' => 'xml', | ||
+ | 'domain' => 'test1.com', | ||
+ | ); | ||
+ | |||
+ | /* PROCESS THE ACTION */ | ||
+ | $boxisAPI = new BoxisAPIConnection($email, $apikey); | ||
+ | $return = $boxisAPI->call($apitype, $command, $params); | ||
</pre> | </pre> |
Revision as of 10:36, 24 May 2012
Contents
Domain Function: getDomain
With this command, you are able to viewing the domain details.
Input params
- version::String - API version (e.g. '1.0')
- timestamp::String - Sequence of characters, denoting the date and time (e.g '1336553826')
- username::String - User e-mail address (e.g 'mail1@example.com')
- authcode::String - md5 hash consisting of the concatenation of timestamp and user_key (e.g md5(1336553826BX3KwWU2SuqvoEWnjYmOibf'))
- section::String - API module name. Use 'domains' value
- action::String - API module function. Use 'getDomain' value
- domain::String - Domain name that you need to register
Output params
Example in XML (Success)
<?xml version="1.0" encoding="UTF-8"?> <return> <result>1</result> <resulttxt></resulttxt> <params> <details> <domain>test1.com</domain> <order_id>654</order_id> <payment_module>130</payment_module> <date_created>1970-01-01</date_created> <firstpayment>17.68</firstpayment> <recurring_amount>17.68</recurring_amount> <years>2</years> <expires>1970-01-01</expires> <type>Register</type> <status>Pending</status> <next_due>1970-01-01</next_due> <next_invoice>1969-12-25</next_invoice> <protect-privacy>1</protect-privacy> <nameservers> <ns1>ns1.boxis.ch</ns1> <ns2>ns1.boxis.ch</ns2> <ns3>ns3.boxis.ch</ns3> <ns4>ns4.boxis.ch</ns4> <ns5>ns5.boxis.ch</ns5> </nameservers> <autorenew>1</autorenew> <protection-lock>0</protection-lock> <auth-code></auth-code> <notes></notes> <extended></extended> <lastname>Keck</lastname> <firsname>Konrad</firsname> </details> </params> <timestamp>1335781349</timestamp> </return>
Example in XML (Error)
<?xml version="1.0" encoding="UTF-8"?> <return> <result>0</result> <resulttxt>Error: {error description}</resulttxt> <params/> <timestamp>1335767184</timestamp> </return>
Example in JSON (Success)
{"result":"1", "resulttxt":null, "params":{ "details":{ "domain":"test1.com", "order_id":"654", "payment_module":"130", "date_created":"1970-01-01", "firstpayment":"17.68", "recurring_amount":"17.68", "years":"2","expires":"1970-01-01", "type":"Register", "status":"Pending", "next_due":"1970-01-01", "next_invoice":"1969-12-25", "protect-privacy":"1", "nameservers{ "ns1":"ns1.boxis.ch", "ns2":"ns1.boxis.ch", "ns3":"ns3.boxis.ch", "ns4":"ns4.boxis.ch", "ns5":"ns5.boxis.ch"}, "autorenew":"1", "protection-lock":"0", "auth-code":"", "notes":"", "extended":"", "lastname":"Keck", "firsname":"Konrad"} }, "timestamp":1335781465}
Example in JSON (Error)
{"result":"0", "resulttxt":"Error: {error description}", "params":[],"timestamp":1335777400}
Example using our PHP Class
/* API LOGIN DETAILS */ $email = 'your@mail.com'; // your username $apikey = '1234567890'; // your apikey /* API COMMAND DETAILS */ $apitype = 'domains'; $command = 'getDomain'; $params = array( 'returntype' => 'xml', 'domain' => 'test1.com', ); /* PROCESS THE ACTION */ $boxisAPI = new BoxisAPIConnection($email, $apikey); $return = $boxisAPI->call($apitype, $command, $params);