{"id":8358,"date":"2021-11-01T18:26:26","date_gmt":"2021-11-01T23:26:26","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=8358"},"modified":"2021-11-02T18:41:41","modified_gmt":"2021-11-02T23:41:41","slug":"porkbun-ddns-api","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=8358","title":{"rendered":"Porkbun DDNS API"},"content":{"rendered":"<p>I&#8217;ve been working on a <a href=\"https:\/\/github.com\/ljr55555\/ddnsPorkbun\" target=\"_blank\" rel=\"noopener\">script that updates our host names in Porkbun<\/a>, but the script had a problem with the example.com type A records. Updating host.example.com worked fine, but example.com became example.com.example.com<\/p>\n<p>Now, in a Bind zone, you just fully qualify the record by post-pending the implied root dot (i.e. instead of &#8220;example.com&#8221;, you use &#8220;example.com.&#8221;, but Porkbun didn&#8217;t understand a fully qualified record. You cannot say the name is null (or &#8220;&#8221;). You cannot say the name is &#8220;example.com&#8221; or &#8220;example.com.&#8221;<\/p>\n<p>In what I hope is my final iteration of the script, I now identify cases where the name matches the zone and <em>don&#8217;t<\/em> include the name parameter in the JSON data. Otherwise I include the &#8216;name&#8217; as the short hostname (i.e. the fully qualified hostname minus the zone name). This appears to be working properly, so (fingers crossed, knock on wood, and all that) our &#8216;stuff&#8217; won&#8217;t go offline next time our IP address changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been working on a script that updates our host names in Porkbun, but the script had a problem with the example.com type A records. Updating host.example.com worked fine, but example.com became example.com.example.com Now, in a Bind zone, you just fully qualify the record by post-pending the implied root dot (i.e. instead of &#8220;example.com&#8221;, you &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,30],"tags":[1487,100,1486,664],"class_list":["post-8358","post","type-post","status-publish","format-standard","hentry","category-coding","category-system-administration","tag-ddns","tag-dns","tag-porkbun","tag-python"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8358"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8358\/revisions"}],"predecessor-version":[{"id":8359,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8358\/revisions\/8359"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}