• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Plesk Downgrade Key API

InsertCoin

Basic Pleskian
Hi,

I am expanding some internal systems to allow keys to be downgraded when required, unfortunately, the API documentation is a little cryptic.

partner10.downgradeKey

The API requires that the 3rd parameter is "name of the upgrade plan to remove". I thought I would be able to use the constants as found here, but these are only for upgrades and I can't discern the right name of the upgrade plan to remove and then how to add in the required name to downgrade to.

Any help would be most welcome.
 
Indeed, there is a misunderstanding with the downgrade.
It is better to explain by example. To upgrade the Plesk Web Pro license -> Plesk Web Host you need a call:

partner10.upgradeKey( <KEY_NUMBER>, "PLESK-12-WEB-PRO-TO-PLESK-12-WEB-HOST" )

And to downgrade Plesk Web Host -> Plesk Web Pro you need a call:

partner10.downgradeKey( <KEY_NUMBER>, "PLESK-12-WEB-PRO-TO-PLESK-12-WEB-HOST" )

that is, the upgrade plan "PLESK-12-WEB-PRO-TO-PLESK-12-WEB-HOST" will be applied backwards.

BTW, The operation of downgrade is not included in the standard role. It requires extended privileges. And why do not you use Partner 3.0? - it's more understandable in my opinion - Modifying a License Key
 
BTW, The operation of downgrade is not included in the standard role. It requires extended privileges. And why do not you use Partner 3.0? - it's more understandable in my opinion - Modifying a License Key

Just looked at my code and I am using the API 3.0 :/ Google sent me to the other API when I was searching.

Still, I am confused on the API 3.0 documentation. Does it use the same principal as you detailed above? and I just need to "PUT" a request over:

PHP:
$apiRequest = array(
 "item" => "PLESK-12-WEB-PRO-TO-PLESK-12-WEB-HOST"
);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($apiRequest));
 
If you are using Partner API 3.0 then you just need to specify the desired state of the key.

Creating a Web Host:
Code:
POST  /keys
{
  "items": [
     {"item": "PLESK-12-WEB-HOST-1M"}
  ]
}
Downgrade to Web Pro:
Code:
PUT /keys/<keynumber>
{
"items": [
    {"item": "PLESK-12-WEB-PRO-1M"}
  ]
}
 
And please be sure that you have corresponding rights. By default, downgrade is prohibited.
 
Back
Top