• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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