API vs Web-Interface

Discussion in 'Developers' Forum' started by KoS, Nov 26, 2013.

  1. KoS

    KoS Member HowtoForge Supporter

    Hi

    for the testing of my migration setup i thought i could just delete the domains, that were created for testing, via the mail_domain_del API call and everything would be deleted. i just noticed that this doesn't work as expected
    -> it just deletes the domain entry in the mail table, but doesn't clean up all the mailboxes, forwards etc.
    -> in the WebUI, if i delete a mail-domain, all the other stuff gets deleted as expected.

    is this on purpose? the difference between webui and API. what is the use-case for deleting only the mail-domain but NOT all the affilated mailboxes, forwards etc?

    greets
    KoS
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    yes.

    The api is a low level api, it allows the developer to do deep changes in ispconfig structure and setup. This implies also that the developer which uses the api has to take care that he deletes the depending records himself.

    As this question arises from time to time, I'am considereing to add a additional api with a limited functionality and limited access to fields and variables that does more things automatically.
     

Share This Page