• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Plesk API - Retrieve Domain (Site) Information

bpmbriguy

New Pleskian
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
 
Back
Top