{"id":276,"date":"2013-05-01T05:17:25","date_gmt":"2013-05-01T05:17:25","guid":{"rendered":"http:\/\/kb.digitalregistra.co.id\/?page_id=276"},"modified":"2018-01-25T03:40:51","modified_gmt":"2018-01-25T03:40:51","slug":"create-dns","status":"publish","type":"page","link":"https:\/\/kb.srs-x.com\/id\/api\/dns\/create-dns\/","title":{"rendered":"Create DNS Record"},"content":{"rendered":"<p><a href=\"http:\/\/kb.srs-x.com\/en\/api\/dns\/create-dns\"><strong>English version<\/strong><\/a><\/p>\n<h2>Deskripsi<\/h2>\n<p>Membuat DNS Record<\/p>\n<h2>Query<\/h2>\n<p>dns\/create<\/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 >Varchar(255)<\/td>\n<td >Required<\/td>\n<td >Nama Domain<\/td>\n<\/tr>\n\r\n<tr><td >type<\/td>\n<td >enum(A AAAA CNAME MX NS SRV TXT)<\/td>\n<td >Required<\/td>\n<td > Type record<\/td>\n<\/tr>\n\r\n<tr><td >record<\/td>\n<td >varchar<\/td>\n<td >Required<\/td>\n<td > record dns (kosongkan jika disamakan dengan nama domain)<\/td>\n<\/tr>\n<\/tbody><\/table><\/div>\n<p>Parameter Tambahan (sesuai dengan type)<\/p>\n<div class=\"table-responsive\"><table  style=\"width:100%; \"  class=\"easy-table easy-table-cuscosky \" >\n<thead>\r\n<tr><th >Type<\/th>\n<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 >A<\/td>\n<td >destination <\/td>\n<td > IPv4<\/td>\n<td > Required on Type A<\/td>\n<td > contoh : 34.54.45.23<\/td>\n<\/tr>\n\r\n<tr><td >A<\/td>\n<td >class <\/td>\n<td > IN<\/td>\n<td > Required on Type A<\/td>\n<td > default IN<\/td>\n<\/tr>\n\r\n<tr><td >A<\/td>\n<td >ttl<\/td>\n<td > Integer<\/td>\n<td > Required on Type A<\/td>\n<td > contoh : 86400<\/td>\n<\/tr>\n\r\n<tr><td >AAAA<\/td>\n<td >destination <\/td>\n<td > IPv6<\/td>\n<td > Required on Type AAAA<\/td>\n<td > contoh : fe80::76e5:43ff:fe12:26df<\/td>\n<\/tr>\n\r\n<tr><td >AAAA<\/td>\n<td >class <\/td>\n<td > IN<\/td>\n<td > Required on Type AAAA<\/td>\n<td > default IN<\/td>\n<\/tr>\n\r\n<tr><td >AAAA<\/td>\n<td >ttl<\/td>\n<td > Integer<\/td>\n<td > Required on Type AAAA<\/td>\n<td > contoh : 86400<\/td>\n<\/tr>\n\r\n<tr><td >CNAME<\/td>\n<td >destination <\/td>\n<td > varchar<\/td>\n<td > Required on Type CNAME<\/td>\n<td > domain destination<\/td>\n<\/tr>\n\r\n<tr><td >CNAME<\/td>\n<td >class <\/td>\n<td > IN<\/td>\n<td > Required on Type CNAME<\/td>\n<td > default IN<\/td>\n<\/tr>\n\r\n<tr><td >CNAME<\/td>\n<td >ttl<\/td>\n<td > Integer<\/td>\n<td > Required on Type CNAME<\/td>\n<td > contoh : 86400<\/td>\n<\/tr>\n\r\n<tr><td >MX<\/td>\n<td >destination <\/td>\n<td > Varchar<\/td>\n<td > Required on Type MX<\/td>\n<td > domain destination<\/td>\n<\/tr>\n\r\n<tr><td >MX<\/td>\n<td >preference <\/td>\n<td > Integer<\/td>\n<td > Required on Type MX<\/td>\n<td > preference bredasarkan mail server<\/td>\n<\/tr>\n\r\n<tr><td >MX<\/td>\n<td >class <\/td>\n<td > IN<\/td>\n<td > Required on Type MX<\/td>\n<td > default IN<\/td>\n<\/tr>\n\r\n<tr><td >MX<\/td>\n<td >ttl<\/td>\n<td > Integer<\/td>\n<td > Required on Type MX<\/td>\n<td > contoh : 86400<\/td>\n<\/tr>\n\r\n<tr><td >NS<\/td>\n<td >destination <\/td>\n<td > varchar<\/td>\n<td > Required on Type NS<\/td>\n<td > nameserver<\/td>\n<\/tr>\n\r\n<tr><td >NS<\/td>\n<td >class <\/td>\n<td > IN<\/td>\n<td > Required on Type NS<\/td>\n<td > default IN<\/td>\n<\/tr>\n\r\n<tr><td >NS<\/td>\n<td >ttl<\/td>\n<td > Integer<\/td>\n<td > Required on Type NS<\/td>\n<td > contoh : 86400<\/td>\n<\/tr>\n\r\n<tr><td >SRV<\/td>\n<td >destination <\/td>\n<td > varchar<\/td>\n<td > Required on Type SRV<\/td>\n<td ><\/td>\n<\/tr>\n\r\n<tr><td >SRV<\/td>\n<td >priority <\/td>\n<td > varchar<\/td>\n<td > Required on Type SRV<\/td>\n<td ><\/td>\n<\/tr>\n\r\n<tr><td >SRV<\/td>\n<td >weight <\/td>\n<td > Integer<\/td>\n<td > Required on Type SRV<\/td>\n<td ><\/td>\n<\/tr>\n\r\n<tr><td >SRV<\/td>\n<td >port <\/td>\n<td > Integer<\/td>\n<td > Required on Type SRV<\/td>\n<td ><\/td>\n<\/tr>\n\r\n<tr><td >SRV<\/td>\n<td >class <\/td>\n<td > Integer<\/td>\n<td > Required on Type SRV<\/td>\n<td > default IN<\/td>\n<\/tr>\n\r\n<tr><td >SRV<\/td>\n<td >ttl<\/td>\n<td > Integer<\/td>\n<td > Required on Type SRV<\/td>\n<td > contoh : 86400<\/td>\n<\/tr>\n\r\n<tr><td >TXT<\/td>\n<td >destination <\/td>\n<td > text<\/td>\n<td > Required on Type TXT<\/td>\n<td > text record<\/td>\n<\/tr>\n\r\n<tr><td >TXT<\/td>\n<td >class <\/td>\n<td > IN<\/td>\n<td > Required on Type TXT<\/td>\n<td > default IN<\/td>\n<\/tr>\n\r\n<tr><td >TXT<\/td>\n<td >ttl<\/td>\n<td > Integer<\/td>\n<td > Required on Type TXT<\/td>\n<td > contoh : 86400<\/td>\n<\/tr>\n<\/tbody><\/table><\/div><br \/>\nType<br \/>\nContoh<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$post['username'] = 'apiusername';\r\n$post['password'] = hash('sha256','apipassword');\r\n$post[&amp;quot;domain&amp;quot;] = 'domain.co.id'\r\n$post[&amp;quot;type&amp;quot;] = 'A'\r\n$post[&amp;quot;destination&amp;quot;] = '34.54.65.65'\r\n$post[&amp;quot;class&amp;quot;] = 'IN'\r\n$post[&amp;quot;ttl&amp;quot;] = '86400'\r\n$url = 'http:\/\/[reseller url]\/api\/dns\/create';\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=\"\">\r\n&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;\r\n&amp;lt;epp&amp;gt;\r\n  &amp;lt;result&amp;gt;\r\n    &amp;lt;resultCode&amp;gt;1000&amp;lt;\/resultCode&amp;gt;\r\n    &amp;lt;resultMsg&amp;gt;Command Complete Succesfully&amp;lt;\/resultMsg&amp;gt;\r\n  &amp;lt;\/result&amp;gt;\r\n  &amp;lt;resultData\/&amp;gt;\r\n&amp;lt;\/epp&amp;gt;\r\n<\/pre>\n<p>Gagal<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;\r\n&amp;lt;epp&amp;gt;\r\n  &amp;lt;result&amp;gt;\r\n    &amp;lt;resultCode&amp;gt;1001&amp;lt;\/resultCode&amp;gt;\r\n    &amp;lt;resultMsg&amp;gt;Command Failed&amp;lt;\/resultMsg&amp;gt;\r\n  &amp;lt;\/result&amp;gt;\r\n&amp;lt;\/epp&amp;gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>English version Deskripsi Membuat DNS Record Query dns\/create List Variabel Parameter Tambahan (sesuai dengan type) Type Contoh Respon Contoh Berhasil Gagal<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":259,"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\/276"}],"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=276"}],"version-history":[{"count":10,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/276\/revisions"}],"predecessor-version":[{"id":1999,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/276\/revisions\/1999"}],"up":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/259"}],"wp:attachment":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/media?parent=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}