API and client template

Discussion in 'Developers' Forum' started by themark, May 6, 2014.

  1. themark

    themark Member

    Hi,

    i'm gonna to look deeply the API of ISPCONFIG.
    At this time i have didn't see anything about the assign of one template to one customer.
    I'm wrong about it?

    thank you
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Id of template has to go to template_master field of the client if it is a master template.
     
  3. themark

    themark Member

    Yes, but what if I want add an additional template to an existing customer?
    :confused:
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    There are separate remoting functions for that:
    client_template_additional_add and client_template_additional_delete
     
  5. themark

    themark Member

    ah ok this is great. thank you.

    But in the last ispconfig package that i have downloaded in order to read the documentation and the example for the API there is no mention of this two methods.

    Where can I find the total list of the available method for the api?

    Thank's
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look at the file /usr/local/ispconfig/interface/lib/classes/remoting.inc.php, it contains all functions that are available trogh the remote api.
     
  7. themark

    themark Member

    yeah, this is exactly what i need! :)
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    There is one more thing that is not in the api doc yet, all *_get functions support a advanced query syntax to search for records by passing an array instead of the primary ID to the function. example:

    client_get($session_id,array('name' => 'Tom'));
     
  9. themark

    themark Member

    Great!
    I have also saw that the method client_template_additional_add and client_template_additional_delete are available on the ispconfig 3.0.5.4 and not 3.0.5.3 that I have.

    But this is not a problem we will upgrade the panel asap.
    Thank's again.
     

Share This Page