DNS zone creation through template ID

Discussion in 'Developers' Forum' started by Massimiliano Micol, Jul 19, 2021.

  1. Massimiliano Micol

    Massimiliano Micol New Member

    Good morning,
    I am trying to create a DNS zone using an existing template, but I read the docs and apparently I did not find a way to do so. I am aware that it is possible to manually create a DNS zone, but I would prefer to use a template. Could someone tell me if there is a way to use them?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You have to create the template first, then create zone with that template. ISPConfig Manual explains DNS Template in chapter 4.8.1.3 Templates.
     
    Massimiliano Micol likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The remote API function to create a zone from template is:

    $client->dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email)
     
    Massimiliano Micol likes this.
  4. Massimiliano Micol

    Massimiliano Micol New Member

    Thank you for your answer, @Taleman, I appreciate the consideration. I forgot to mention that I need to do it in PHP, not manually. So the answer provided by @till should do the trick. Thank you!
     

Share This Page