• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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