Import DNS Data

Discussion in 'General' started by pyte, Mar 28, 2022.

  1. pyte

    pyte New Member

    Hey!
    i've prepared a script to import DNS Data via SOAP into my ISPConfig. Everything is working fine so far, howerver i have a problem with 1 field that seems to get importet correctly but is not displayed correctly.
    The relevant part of the import-code:

    PHP:
    $zone_params = array(
                    
    'server_id' => 1,
                    
    'origin' => $tmp_domain ".",
                    
    'ns' => "ns1.******.com",
                    
    'mbox' => str_replace("@""."$id['email']) . ".",
                    
    'refresh' => "28800",
                    
    'retry' => "7200",
                    
    'expire' => "604800",
                    
    'minimum' => "86400",
                    
    'ttl' => "86400",
                    
    'xfer' => "",
                    
    'also_notify' => "",
                    
    'update_acl' => "",
                    
    'active' => 'y',
                );
    The field 'server_id' is not getting displayed in the DNS overview tab in ISPConfig. See here:
    [​IMG]

    However after going into the entry it shows this:
    [​IMG]

    Is there a way to fix this? Is my code wrong? I've tried different things for the server_id variable but no luck. Can someone tell me where in the Database i can find these entries?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You seem to set a wrong server ID in API call, that's why it is not displayed. Your name server has not ID 1.
     
    pyte likes this.
  3. pyte

    pyte New Member

    Where can i check the server ID of the nameserver?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    In the database, table 'server'.
     
    pyte likes this.
  5. pyte

    pyte New Member

    You were right. The server ID is "2". However after setting it in the script the same issue still appears to be there. Can you tell my in which database the DNS entries get stored?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    dns_soa and dns_rr
     
    pyte likes this.
  7. pyte

    pyte New Member

    I've made a mistake, the server_id was "3" working now. Thank you again for this amazing support :)
     

Share This Page