0

I need connect to ISPConfig 3 with python 3.5 without WSDL and get data from it. I didn't find anything useful yet, maybe someone have tried it already or have any suggestions, tips or example code? There are some examples for php, but nothing fresh for python.

SOME CODE

At the moment I have this, but I have no ideas if it's even something working and useful, but at least something.

from django.core.management.base import BaseCommand
from pysimplesoap.client import SoapClient


class Command(BaseCommand):
    def handle(self, *args, **options):

        username = 'usr'
        password = 'usrpswd'
        url = 'https://link/remote/index.php'
        uri = 'https://link/remote'

        client = SoapClient(
            location=url,
            trace=True,
            http_headers={'Authorization': 'Basic %s:%s' % (username, password)}
        )

OTHER SOURCES

Also I have found this ipsconfig-json-wrapper and after I placed files in folder and go to http://{domain}/remote/json.php?method=login&username=fubar&password=boobaz&callback=JSON_CALLBACK

I get typeof JSONP === 'function' && JSONP({"success":true,"response":"**************************"});

Maybe someone could help now to make GET request and get some data or at least explain what should I do next?

Trimidas
  • 97
  • 1
  • 1
  • 8
  • If you check the source files which are bundled with ISPconfig, there a load of API scripts including a soap config file. These are written in PHP but could give you the option of calling PHP scripts from within python. Just an idea. – jamboNum5 Sep 07 '16 at 14:20
  • @fyberoptik I tried json-wrapper and seems it might work. You can put method in url and call for example "get_domain" or something. But it ask for session ID, so need to think about that. – Trimidas Sep 08 '16 at 07:08

0 Answers0