ISPConfig 3.0.3.1 API

Discussion in 'Developers' Forum' started by holykim, Dec 15, 2010.

  1. holykim

    holykim Member

    Hi Till

    Thank you for your reply. My code is below which is the exactly same with a sample code just except the params. Please advise exactly what I have to change?

    Thanks

    Harry


    PHP:
    try {
        
        
    $params = array(        'server_id' => 1,
                                
    'company_name' => $mb_2,
                                
    'contact_name' => $contact_name,
                                
    'username' => $mb_mid,
                                
    'password' => $mb_password,
                                
    'language' =>'en',
                                
    'usertheme' =>'default',
                                
    'street' => $street,
                                
    'zip' => $mb_zip,
                                
    'city' => $mb_city,
                                
    'state' => $mb_state,
                                
    'country' => $mb_country,
                                
    'telephone' => $telephone,
                                
    'mobile' => $mobile,
                                   
    'fax' => $fax,
                                   
    'email' => $mb_email,
                                
    'internet' =>'',
                                
    'icq' =>'',
                                   
    'notes' =>'',  
                                
    'template_master' => '0',
                                
    'template_additional' => '',
                                
    'default_mailserver' => '1',
                                
    'limit_maildomain' => '-1',
                                
    'limit_mailbox' => $limit_mailbox,
                                
    'limit_mailalias' => '-1',
                                
    'limit_mailaliasdomain' => '-1',
                                
    'limit_mailforward' => '-1',
                                
    'limit_mailcatchall' => '-1',
                                
    'limit_mailrouting' => '0',
                                
    'limit_mailfilter' => '0',
                                   
    'limit_fetchmail' => '-1',
                                
    'limit_mailquota' => $limit_mailquota,
                                
    'limit_spamfilter_wblist' => '0',
                                
    'limit_spamfilter_user' => '0',
                                
    'limit_spamfilter_policy' => '0',
                                
    'default_webserver' => '1',
                                
    'limit_web_domain' => $limit_web_domain,
                                
    'limit_web_quota' => $limit_web_quota,
                                   
    'web_php_options' => 'no,fast-cgi,cgi,mod,suphp',
                                
    'limit_web_aliasdomain' => '-1',
                                
    'limit_web_subdomain' => '-1',
                                
    'limit_ftp_user' => $limit_ftp_user,
                                
    'limit_shell_user' => $limit_shell_user,
                                
    'ssh_chroot' => 'jailkit',
                                
    'default_dnsserver' => '1',
                                
    'limit_dns_zone' => '-1',
                                
    'limit_dns_record' => '-1',
                                
    'limit_client' => $limit_client,
                                
    'default_dbserver' => '1',
                                
    'limit_database' => $limit_database,
                                
    'limit_cron' => '-1',
                                
    'limit_cron_type' => 'url',
                                   
    'limit_cron_frequency' => '5',
                                
    'limit_traffic_quota' => $limit_traffic_quota);


        
    $return_client_id $client->client_update($session_id$client_id$reseller_id$params);
        
        
    } catch (
    SoapFault $e) {
        die(
    'SOAP Error: '.$e->getMessage());
    }
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I've moved your post to the dev forum now as it is only related to the API.

    Here are the changes that we did in the API:

    ISPConfig 3.0.2.2:

    client_update($session_id, $reseller_id, $client_id, $params)

    ISPConfig 3.0.3:

    client_update($session_id, $client_id, $reseller_id, $params)

    In your code, did you exchange the variable order where you call this function already?
     
  3. holykim

    holykim Member

    Hi Till

    Thanks for moving my post to Dev forum.

    Yes, I did and had a Soap error 'Wrong version' so I tried to find the reason for the error from remote.inc.php.

    I changed code (just exchanged $reseller_id and $client_id) as below and it's working without error.

    $affected_rows = $this->updateQuery('../client/form/client.tform.php', $reseller_id, $client_id, $params);


    Thanks

    Harry
     
  4. Germanius

    Germanius Member

    I've got another question:
    Is there a function for adding a domain / a website? I only see examples for adding an email domain.
    And how can I find out the ID of a client via the API?
     
    Last edited: Dec 15, 2010
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    @holykim: I will forward the problem back to the API devs that changed the API.

    @Germanius:

    http://www.howtoforge.com/forums/showthread.php?t=50404

    By the way, please make a new thread the next time as your question is not related to the problem discussed in this thread.
     

Share This Page