Adding api function

Discussion in 'Developers' Forum' started by Thaddeus, Jul 5, 2016.

  1. Thaddeus

    Thaddeus New Member

    Hi Guys, is editing the /usr/local/ispconfig/interface/lib/classes/ the recommended way to add a new api function or is there a better way?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I would do it the way that we use for the billing module. Write your own class that extends the current remote api class, then create a new remote api endpoint file similar to this one:

    require_once '../../lib/';
    $conf['start_session'] = false;
    require_once '../../lib/';
    if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
    $server = new SoapServer(null, array('uri' => $_SERVER['REQUEST_URI']));

Share This Page