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 - Retrieve Domain (Site) Information

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by bpmbriguy, Mar 10, 2011.

  1. bpmbriguy

    bpmbriguy New Pleskian

    15
    60%
    Joined:
    Feb 19, 2011
    Messages:
    2
    Likes Received:
    0
    Location:
    Chicago, IL
    I am trying to get the site information for a domain through the API. I'm reaching my breaking point since I just figured all of this out for V9.5.5 last week.. and then of course my service provider upgraded the panel without notifying me. Any help would be greatly appreciated!

    When I send this packet to the API I get a successful response:
    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.6.3.0">
    <site>
    <get>
    <filter>
    <name>domain.com</name>
    </filter>
    <dataset>
    <gen_info/>
    </dataset>
    </get>
    </site>
    </packet>

    This data is returned:
    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.6.3.0">
    <site>
    <get>
    <result>
    <status>ok</status>
    <filter-id>domain.com</filter-id>
    <id>339</id>
    <data>
    <gen_info>
    <cr_date>2011-03-08</cr_date>
    <name>domain.com</name>
    <ascii-name>domain.com</ascii-name>
    <status>0</status>
    <real_size>1245184</real_size>
    <dns_ip_address>***MASKED***</dns_ip_address>
    <htype>vrt_hst</htype>
    <guid>***MASKED***</guid>
    <webspace-guid>***MASKED***</webspace-guid>
    </gen_info>
    </data>
    </result>
    </get>
    </site>
    </packet>


    When I try to request any other variation of the dataset I receive this response:
    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.6.3.0">
    <site>
    <get>
    <result>
    <status>error</status>
    <errcode>1013</errcode>
    <errtext>Site does not exist</errtext>
    <filter-id>domain.com</filter-id>
    <id>339</id>
    </result>
    </get>
    </site>
    </packet>

    The domain ID is included in the response so obviously it exists but for some reason the data isn't being returned.

    This is the packet I am sending which does not return a response:
    <?xml version="1.0" encoding="UTF-8"?>
    <packet version="1.6.3.0">
    <site>
    <get>
    <filter>
    <name>domain.com</name>
    </filter>
    <dataset>
    <gen_info/>
    <hosting/>
    <stat/>
    <prefs/>
    <disk_usage/>
    </dataset>
    </get>
    </site>
    </packet>

    I've tried including only one dataset in the request and every variation I can think of. Has anyone had success with this?

    Thanks in advance!

    -Brian
     
Loading...