Article ID: 119385, created on Dec 27, 2013, last review on May 11, 2014

  • Applies to:
  • Plesk Automation 11.1

Question

How to check connection through API to Parallels Plesk Automation?

Answer

  1. Make sure that port 8440 is listened on PPA management node:

    [root@ppa ~]# netstat -antpl | grep 8440
    tcp        0      0 0.0.0.0:8440                0.0.0.0:*                   LISTEN      1531/SoLoader
    
  2. Create test file with content below:

    [root@ppa ~]# touch apitest.xml
    [root@ppa ~]# chmod 755 apitest.xml
    [root@ppa ~]# cat apitest.xml
    
    
    <?xml version="1.0"?>
    <methodCall>
    <methodName>pem.getAccountInfo</methodName>
    <params>
    <param>
    <value>
    <struct>
    <member>
    <name>account_id</name>
    <value><int>1</int></value>
    </member>
    </struct>
    </value>
    </param>
    </params>
    </methodCall>
    
  3. Send request to PPA management node with curl utility:

    [root@ppa ~]# curl -k -d@apitest.xml https://admin:<YOUR_PASSWORD>@<YOUR_IP_ADDRESS>:8440
    
  4. In answer you will get information about your administrator account in XML format:

    <?xml version="1.0" encoding="utf-8"?>
    <methodResponse><params><param><value><struct><member><name>result</name><value><struct><member><name>account_type</name><value><string>A</string></value></member><member><name>address</name><value><struct><member><name>address2</name><value><string></string></value></member><member><name>city</name><value><string></string></value></member><member><name>country</name><value><string>us</string></value></member><member><name>house_num</name><value><string></string></value></member><member><name>state</name><value><string></string></value></member><member><name>street_name</name><value><string></string></value></member><member><name>zipcode</name><value><string></string></value></member></struct></value></member><member><name>email</name><value><string>test@parallels.com</string></value></member><member><name>fax</name><value><struct><member><name>area_code</name><value><string></string></value></member><member><name>country_code</name><value><string></string></value></member><member><name>ext_num</name><value><string></string></value></member><member><name>phone_num</name><value><string></string></value></member></struct></value></member><member><name>parent_account_id</name><value><i4>1</i4></value></member><member><name>person</name><value><struct><member><name>company_name</name><value><string>Neverhood, Inc.</string></value></member><member><name>first_name</name><value><string>Charlie</string></value></member><member><name>last_name</name><value><string>Root</string></value></member><member><name>middle_name</name><value><string></string></value></member><member><name>title</name><value><string></string></value></member></struct></value></member><member><name>phone</name><value><struct><member><name>area_code</name><value><string></string></value></member><member><name>country_code</name><value><string></string></value></member><member><name>ext_num</name><value><string></string></value></member><member><name>phone_num</name><value><string></string></value></member></struct></value></member></struct></value></member><member><name>status</name><value><i4>0</i4></value></member></struct></value></param></params></methodResponse>
    

Search Words

how to

xml rpc

connection through API

connection through API

api

c1ecc6010feff26cb42d1d14a7881dd6 e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF