• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Plesk API Specified owner can not have sub objects

Nico12

New Pleskian
Hi, we are using the Plesk API for our webhosting service. I created a little Perl Script that creates the Customer + Subscription and installs our Software. Until now this Script everytime creates a new user. In very few cases the Customer already exists on the Server. For this Case i wanted to change my Script.

From our internal database, i already know that a account already exists. But i only got the domain of the existing webhosting. Thats why i grab the Subscription, and not the Customer directly. The response contains "gen_info" with the "owner-id"

'gen_info' => {
'dns_ip_address' => 'xxx.xxx.xxx.xxx',
'htype' => 'vrt_hst',
'status' => '0',
'ascii-name' => 'example.com',
'cr_date' => '2015-04-16',
'vendor-guid' => '6fea168b-f626-4764-95d5-42b2bb99ac1f',
'name' => 'example.com',
'sb-site-uuid' => {},
'description' => {},
'external-id' => {},
'real_size' => '0',
'admin-description' => {},
'owner-id' => '3',
'guid' => 'f2d196f5-31c9-4c85-94e3-8619e47789e0'
}​

To create the Subscription i need a little bit more data (like the username). Thats why i need to fetch this customer first. But then my problem appears. My request looks like this:

<?xml version="1.0" encoding="utf-8"?>
<packet version="1.6.6.0">
<customer>
<get>
<filter>
<owner-id>3</owner-id>​
</filter>
<dataset>
<gen_info/>
<stat/>​
</dataset>​
</get>​
</customer>​
</packet>

The response i get:

'customer' => {
'get' => {
'result' => {
'filter-id' => '3',
'errtext' => 'Specified owner can not have sub objects',
'status' => 'error',
'errcode' => '1060'
};​

The API documentation doesnt describe the error code "1060". I cant find any plesk related topic about this error message. I just want to fetch data, thats why i cant really understand this error message. I believe its some sort of "internal error".

Does anyone know a solution for this ?
 
Back
Top