{"id":76,"date":"2012-09-17T04:06:15","date_gmt":"2012-09-17T04:06:15","guid":{"rendered":"http:\/\/kb.digitalregistra.co.id\/?page_id=76"},"modified":"2018-01-25T03:31:53","modified_gmt":"2018-01-25T03:31:53","slug":"delete-host","status":"publish","type":"page","link":"https:\/\/kb.srs-x.com\/id\/api\/host\/delete-host\/","title":{"rendered":"Delete Host"},"content":{"rendered":"<p><a href=\"http:\/\/kb.srs-x.com\/en\/api\/host\/delete-host\"><strong>Englsih version<\/strong><\/a><\/p>\n<h2>Deskripsi<\/h2>\n<p>Menghapus host. Host hanya bisa dihapus jika tidak berelasi dengan domain lain.<\/p>\n<h2>Query<\/h2>\n<p>host\/delchild<\/p>\n<h2>List Variabel<\/h2>\n<div class=\"table-responsive\"><table  style=\"width:100%; \"  class=\"easy-table easy-table-cuscosky \" >\n<thead>\r\n<tr><th >Nama<\/th>\n<th >Tipe Data<\/th>\n<th > Required\/Optional<\/th>\n<th >Deksripsi<\/th>\n<\/tr>\n<\/thead>\n<tbody>\r\n<tr><td >domain<\/td>\n<td >String(63)<\/td>\n<td >Required<\/td>\n<td >Nama domain dari childns<\/td>\n<\/tr>\n\r\n<tr><td >nameserver<\/td>\n<td >String(63)<\/td>\n<td >Required<\/td>\n<td >Nama host yang akan dihapus<\/td>\n<\/tr>\n<\/tbody><\/table><\/div>\n<p>Contoh<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$post[&quot;username&quot;] = 'apiusername';\r\n$post[&quot;password&quot;] = hash('sha256','apipassword');\r\n$post[&quot;domain&quot;] = 'domainid.co.id'\r\n$post[&quot;nameserver&quot;] = 'ns1.domainid.co.id'\r\n$url = 'http:\/\/[reseller url]\/api\/host\/delchild';\r\n\r\n$ch = curl_init();\r\ncurl_setopt($ch, CURLOPT_URL, $apiurl);\r\ncurl_setopt($ch, CURLOPT_POST, 1);\r\ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\r\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));\r\n$response = curl_exec($ch);\r\ncurl_close($ch);\r\n<\/pre>\n<h2>Respon Contoh<\/h2>\n<p>Berhasil<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;&lt;epp&gt;&lt;result&gt;&lt;resultCode&gt;1000&lt;\/resultCode&gt;&lt;resultMsg&gt;Command completed successfully&lt;\/resultMsg&gt;&lt;\/result&gt;&lt;\/epp&gt;<\/pre>\n<p>Gagal<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;&lt;epp&gt;&lt;result&gt;&lt;resultCode&gt;2303&lt;\/resultCode&gt;&lt;resultMsg&gt;Object does not exist&lt;\/resultMsg&gt;&lt;\/result&gt;&lt;\/epp&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Englsih version Deskripsi Menghapus host. Host hanya bisa dihapus jika tidak berelasi dengan domain lain. Query host\/delchild List Variabel Contoh Respon Contoh Berhasil Gagal<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":68,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/76"}],"collection":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":12,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/76\/revisions"}],"predecessor-version":[{"id":1987,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/76\/revisions\/1987"}],"up":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/68"}],"wp:attachment":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/media?parent=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}