API client_template_add Function ?

Discussion in 'Developers' Forum' started by WHO, Jul 12, 2018.

  1. WHO

    WHO New Member HowtoForge Supporter

    Is there a way to create client_templates by api?
    I can't find a function in remote.d/client.inc.php, but was wondering that there exists a "client_template_additional_add" function for additional templates.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If there is no such function in that file, then there is no API function for that purpose.
     
  3. WHO

    WHO New Member HowtoForge Supporter

    Migrating an existing panel to ispconfig becomes impossible when you have to setup thousands of templates for each customer and reseller. Is a bad idea to put it directly into the database? I think sys_datalog is not called when creating an template and sys_userid / sys_groupid can be copied from sys_user table.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you need that function then you should consider to add it. Adding them to the database should work as well.
     
  5. Jesse Norell

    Jesse Norell Well-Known Member

    Maybe there's some unobvious (to me) reason you're doing that, but having thousands of client templates just sounds like the wrong way to go about your migration, are you creating a template for every single customer? If so, just set custom limits on the client, and skip creating a template altogether.
     
  6. WHO

    WHO New Member HowtoForge Supporter

    Over the year a lot limit_templates are created:
    - every product you ever sold + every individual additional template you set up for a customer + every template from your reseller plus their add. templates. ....
    putting it in the database works, but an api function would be nice.
     

Share This Page