TITLE:
XML API backup-manager operator does not work
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Product version: Plesk Obsidian 18.0.20.2
OS version: Ubuntu 18.04 x86_64
Build date: 2019/11/01 13:00
Revision: 8990d615e1ba3c129f3e9a49ad9a3ff28d99aa08
PROBLEM DESCRIPTION:OS version: Ubuntu 18.04 x86_64
Build date: 2019/11/01 13:00
Revision: 8990d615e1ba3c129f3e9a49ad9a3ff28d99aa08
We have been trying to manage backups using the XML API, but cannot get the backup-manager operator to work (Managing Backups).
STEPS TO REPRODUCE:Create a file backupmanager.get-local-backup-list, with the following contents:
<packet>
<backup-manager>
<get-local-backup-list>
<server/>
</get-local-backup-list>
</backup-manager>
</packet>
Execute:
curl -L -H "Content-Type: text/xml" -H "KEY: <secret key>" -H "HTTP_PRETTY_PRINT: TRUE" -d @backupmanager.get-local-backup-list https://<hostname>:8443/enterprise/control/agent.php
ACTUAL RESULT:<packet>
<backup-manager>
<get-local-backup-list>
<server/>
</get-local-backup-list>
</backup-manager>
</packet>
Execute:
curl -L -H "Content-Type: text/xml" -H "KEY: <secret key>" -H "HTTP_PRETTY_PRINT: TRUE" -d @backupmanager.get-local-backup-list https://<hostname>:8443/enterprise/control/agent.php
<?xml version="1.0"?>
<packet version="1.6.9.1">
<system>
<status>error</status>
<errcode>1014</errcode>
<errtext>Parser error: Request is invalid. Error in line 1: Element 'backup-manager': This element is not expected. Expected is one of ( request-settings, server, customer, webspace, subdomain, dns, db_server, mail, certificate, site-alias ).</errtext>
</system>
</packet>
EXPECTED RESULT:<packet version="1.6.9.1">
<system>
<status>error</status>
<errcode>1014</errcode>
<errtext>Parser error: Request is invalid. Error in line 1: Element 'backup-manager': This element is not expected. Expected is one of ( request-settings, server, customer, webspace, subdomain, dns, db_server, mail, certificate, site-alias ).</errtext>
</system>
</packet>
List of backups sent in an XML packet. I expected a result similar to that given in the documentation (Retrieving a List of Local Backups):
<packet version="1.6.7.0">
<backup-manager>
<get-local-backup-list>
<result>
<status>ok</status>
<backup>
<file>
<name>12-11-2003-mycustomer_3_8.bak</name>
<creation-date>1179482633</creation-date>
<description/>
<size>0</size>
<not-backup/>
</file>
</backup>
<backup>
<file>
<name>priest_2007.05.18_17.12</name>
<creation-date>1179483198</creation-date>
<description>sdf backup.
Creation date: May 18, 2007 05:12 PM</description>
<size>128732</size>
</file>
</backup>
</result>
</get-local-backup-list>
</backup-manager>
</packet>
ANY ADDITIONAL INFORMATION:<packet version="1.6.7.0">
<backup-manager>
<get-local-backup-list>
<result>
<status>ok</status>
<backup>
<file>
<name>12-11-2003-mycustomer_3_8.bak</name>
<creation-date>1179482633</creation-date>
<description/>
<size>0</size>
<not-backup/>
</file>
</backup>
<backup>
<file>
<name>priest_2007.05.18_17.12</name>
<creation-date>1179483198</creation-date>
<description>sdf backup.
Creation date: May 18, 2007 05:12 PM</description>
<size>128732</size>
</file>
</backup>
</result>
</get-local-backup-list>
</backup-manager>
</packet>
This does not work for Plesk Onyx either.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug