ISPConfig API Soap Request

Discussion in 'General' started by Parsival, Aug 19, 2018.

  1. Parsival

    Parsival New Member

    Hi all,
    I'm trying to use the ISP Config API from python, since I'm not that familiar with PHP. Since there is no WSDL I'm facing issues in building the correct request payload:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    >
    <SOAP-ENV:Body>
    <mail_blacklist_add SOAP-ENC:root="1">
    <v1 xsi:type="xsd:string">{sessiond_id}</v1>
    <v2>
    <access xsi:type="xsd:string">REJECT</access>
    <source xsi:type="xsd:string">51.68.127.0</source>
    <server_id xsi:type="xsd:int">1</server_id>
    <type xsi:type="xsd:string">client</type>
    <active xsi:type="xsd:string">y</active>
    </v2>
    </mail_blacklist_add>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I'm receiving:
    Code:
    <faultcode>database_error</faultcode><faultstring>Column 'server_id' cannot be null INSERT INTO `mail_access` (`server_id`, `source`, `access`, `type`, `active`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`) VALUES (NULL, NULL, NULL, NULL, 'n', '2', '2', 'riud', 'riud', '')</faultstring>
    Does somebody has a working example of the payload? Thanks a lot.
     
    Richard Foley likes this.

Share This Page