Remote API : relationship between domains and client_id

Discussion in 'Developers' Forum' started by electronico_nc, Oct 11, 2014.

  1. Trying to modify DNS using :
    dns_alias_update($session_id, $client_id, $id, $dns_record)
    This works OK when I enter $client_id manually.
    As it's part of a script I can get easilly the $id of the record to update, but I can't find where is the relationship between the domain and the client in database.
    Thanks in advance for your lights.
    PS:`domain` table is empty (but domains are well listed in `dns_soa`) so I can't use domains_get_all_by_user ...
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    you can use:

    client_get_id($session_id, $sys_userid)

    you mix up the domain table (which is the domain limit) with the dns tables.
  3. Thanks Till,

    Another question :
    Several DNS entries need to be updated.
    dns_a_update($session_id, $client_id, $id, $dns_record) modifies $dns_record['serial'] $dns_record['stamp'] $dns_record['data'].
    dns_zone_update($session_id, $client_id, $primary_id, $dns_domain) modifies $dns_domain['serial']
    Does the 'serial' value in `dns_soa` has to be the highest one in `dns-rr` or is just an increased value enough?
    Thanks again.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    A increased value for the serial is fine.

Share This Page