Adding DNS records through API based on template

Discussion in 'General' started by Enes Zorlak, Nov 30, 2021.

  1. Enes Zorlak

    Enes Zorlak New Member

    Hello,
    on my multi-server installation I successfully configured Default Template with several DNS records in it. So after creating zone with "DNS Zone Wizard" everything is fine - i have all "template based" DNS records in a zone.
    But what about adding DNS zones/records through API? Based on info I found in API documentation I can not find the way to add DNS records based on template. I successfully created one test zone with dns_zone_add() function, but it is now empty in ISPconfig admin.
    Is it necessary to add multiple DNS records in "one-by-one way".

    Best regards, Enes
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Use the API function:

    Code:
    dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email)
     
  3. Enes Zorlak

    Enes Zorlak New Member

    Obviously I mistakenly relied on a API documentation which does not contain dns_templatezone_add.
    I will use get_function_list in future in order to have complete list of available functions.
    Thank you very much for your help.
    Regards, Enes
     

Share This Page