{"id":1039,"date":"2015-04-25T09:32:41","date_gmt":"2015-04-25T09:32:41","guid":{"rendered":"http:\/\/kb.srs-x.com\/id\/?page_id=1039"},"modified":"2018-01-25T03:07:53","modified_gmt":"2018-01-25T03:07:53","slug":"set-id-protection","status":"publish","type":"page","link":"https:\/\/kb.srs-x.com\/id\/api\/domain\/set-id-protection\/","title":{"rendered":"Set ID Protection"},"content":{"rendered":"<p><a href=\"http:\/\/kb.srs-x.com\/en\/api\/domain\/set-id-protection\"><strong>English version<\/strong><\/a><\/p>\n<h2>Deskripsi<\/h2>\n<p>API yang digunakan untuk mengeset fitur ID Protection untuk domain tertentu.<\/p>\n<h2>Query<\/h2>\n<p>domain\/set_idprotection<\/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<\/td>\n<\/tr>\n\r\n<tr><td >api_id<\/td>\n<td >Integer(11)<\/td>\n<td >Required<\/td>\n<td >Nilai yang merelasikan api dengan domain<\/td>\n<\/tr>\n\r\n<tr><td >idprotection<\/td>\n<td >String(63)<\/td>\n<td >required<\/td>\n<td >ID Protection (1 atau 0)<\/td>\n<\/tr>\n<\/tbody><\/table><\/div>\n<h2>Contoh Request<\/h2>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$post[&amp;quot;username&amp;quot;] = 'apiusername';\r\n$post[&amp;quot;password&amp;quot;] = hash('sha256','apipassword');\r\n$post[&amp;quot;domain&amp;quot;] = 'domainid.com'\r\n$post[&amp;quot;api_id&amp;quot;] = 1;\r\n$post[&amp;quot;idprotection&amp;quot;] = 1;\r\n\r\n$apiurl = 'http:\/\/[reseller url]\/api\/domain\/set_idprotection';\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>Contoh Response<\/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;ID Protection successfully updated&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;2400&amp;lt;\/resultCode&amp;gt;\r\n        &amp;lt;resultMsg&amp;gt;ID Protection failed to updated&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","protected":false},"excerpt":{"rendered":"<p>English version Deskripsi API yang digunakan untuk mengeset fitur ID Protection untuk domain tertentu. Query domain\/set_idprotection List Variabel Contoh Request Contoh Response Berhasil Gagal<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":8,"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\/1039"}],"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=1039"}],"version-history":[{"count":8,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/1039\/revisions"}],"predecessor-version":[{"id":1969,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/1039\/revisions\/1969"}],"up":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/media?parent=1039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}