1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Plesk api examples

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by Janton, Jul 30, 2012.

  1. Janton

    Janton New Pleskian

    22
    73%
    Joined:
    Sep 8, 2008
    Messages:
    16
    Likes Received:
    0
    Hello,

    Im trying to disable a domain with the api of plesk for a plesk 8.6 and i compose the xml with this structure:

    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.5.2.1">
    <domain>
    <set>
    <filter>
    <name>testapi.domain.com</name>
    </filter>
    <values>
    <gen_setup>
    <status>16</status>
    </gen_setup>
    </values>
    </set>
    </domain>
    </packet>

    The name testapi.domain.com is the domain of the domain, i create a subdomain like a domain for testing purpose, but when i execute the this xml with the api i get this response:

    <?xml version="1.0"?>
    <packet version="1.5.2.1">
    <system>
    <status>error</status>
    <errcode>1014</errcode>
    <errtext>Parser error: Request is invalid</errtext>
    </system> </packet>


    Someone know what is wrong??

    For support of parallels: Please do some basic examples for the beginners like activate/desactivate domains and create/modify/delete mail accounts.

    Best Regards.
     
  2. Honig

    Honig Guest

    0
     
    You should use domain_name node instead of name. I.e:

    You use:
    <filter>
    <name>testapi.domain.com</name>
    </filter>

    Must be:
    <filter>
    <domain_name>testapi.domain.com</domain_name>
    </filter>
     
  3. Janton

    Janton New Pleskian

    22
    73%
    Joined:
    Sep 8, 2008
    Messages:
    16
    Likes Received:
    0
    Thank you Honig.

    I was looking the documentation in http://download1.parallels.com/Plesk/PPP9/Doc/en-US/plesk-9.5-api-rpc/33860.htm and was with "name".

    Maybe im looking at the wrong section or maybe in the plesk linux 8.6 with api version 1.5.2.1 is different. The documentation i found is for plesk 9.5.

    Can you send me or copy the link to the documentation of the api 1.5.2.1?? I have old servers with 8.6, 9.5 and 10.x and i have to use the oldest api version for be compatible with all servers.

    Thank you.
     
Loading...