netcup vServer über den Webservice mit curl steuern

  • Falls es mal jemand braucht, ich hab mir eine Kurzanleitung geschrieben wie ich meine netcup Server über die Webservices steuern kann.
    Und zwar nutze ich das (überall vorhandene und leicht zu bekommende) curl

    Erklärungen hier: Netcup VCP Webservice – netcup Wiki

    Code
    User: 12345
    Pass: 1234567890


    (kann man im VCP https://www.vservercontrolpanel.de/ unter Optionen -> Webservice setzen)

    Serverliste bekommen:

    Code
    curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:"  -d "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://enduser.service.web.vcp.netcup.de/"><soapenv:Header/><soapenv:Body><tns:getVServers><loginName>12345</loginName><password>1234567890</password></tns:getVServers></soapenv:Body>" -X POST https://www.vservercontrolpanel.de/WSEndUser

    vServer mit der ID 'v45612489145648456' starten:

    Code
    curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:"  -d "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://enduser.service.web.vcp.netcup.de/"><soapenv:Header/><soapenv:Body><tns:startVServer><loginName>12345</loginName><password>1234567890</password><vserverName>v45612489145648456</vserverName></tns:startVServer></soapenv:Body>" -X POST https://www.vservercontrolpanel.de/WSEndUser

    vServer mit der ID 'v45612489145648456' stoppen:

    Code
    curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:"  -d "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://enduser.service.web.vcp.netcup.de/"><soapenv:Header/><soapenv:Body><tns:stopVServer><loginName>12345</loginName><password>1234567890</password><vserverName>v45612489145648456</vserverName></tns:stopVServer></soapenv:Body>" -X POST https://www.vservercontrolpanel.de/WSEndUser

    Status des vServers mit der ID 'v45612489145648456' holen:

    Code
    curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:"  -d "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://enduser.service.web.vcp.netcup.de/"><soapenv:Header/><soapenv:Body><tns:getVServerState><loginName>12345</loginName><password>1234567890</password><vserverName>v45612489145648456</vserverName></tns:getVServerState></soapenv:Body>" -X POST https://www.vservercontrolpanel.de/WSEndUser

    IP-Adressen des vServers mit der ID 'v45612489145648456' holen:

    Code
    curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:"  -d "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://enduser.service.web.vcp.netcup.de/"><soapenv:Header/><soapenv:Body><tns:getVServerIPs><loginName>12345</loginName><password>1234567890</password><vserverName>v45612489145648456</vserverName></tns:getVServerIPs></soapenv:Body>" -X POST https://www.vservercontrolpanel.de/WSEndUser

    Thomas