• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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