Modifying a License Key
Signature
Request:
- URL: /30/keys/<KEY_ID_OR_ACTIVATION_CODE>
- Method: PUT
- Body: Partner API 3.0’s License Key Structure
- Optional query string parameters:
-
return-key-state
(boolean). Determines whether to return Partner API 3.0’s License Key Structure of a modified key in the response (false
by default).
-
Response:
- Success status code: 200
- Body: Partner API 3.0’s License Key Structure .
Conflicting Operations
Note that certain operations cannot be performed together within the same HTTP request. This is done to avoid ambiguity in the state of business objects on the server side.
Conflicting? | Move to another owner | Terminate / suspend / resume key | Activate or reactivate key | (Re-)Attach to or detach from parent key | Upgrade key | (Un)Bind key to/from IP address | Assign product configuration to key | Rebuild key items as they are stored on the server side | Update short description (nickname) | Update autoRenew flag |
---|---|---|---|---|---|---|---|---|---|---|
Move to another owner | N/A | yes | yes | yes | yes | yes | yes | no | no | no |
Terminate / suspend / resume key | yes | N/A | yes | yes | yes | yes | yes | no | no | no |
Activate or reactivate key | yes | yes | N/A | no | no | no | no | no | no | no |
(Re-)Attach to or detach from parent key | yes | yes | no | N/A | no | no | no | no | no | no |
Upgrade key | yes | yes | no | no | N/A | no | no | no | no | no |
(Un)Bind key from/to IP address | yes | yes | no | no | no | N/A | no | no | no | no |
Assign product configuration to key | yes | yes | no | no | no | no | N/A | no | no | no |
Rebuild key items in the way they are stored on the server side | no | no | no | no | no | no | no | N/A | no | no |
Update short description (nickname) | no | no | no | no | no | no | no | no | N/A | no |
Update autoRenew flag | no | no | no | no | no | no | no | no | no | N/A |
Note: The key activation function is not supported in modern Plesk versions and is kept for backward compatibility.
Order of Execution
Partner API 3.0 parses and analyzes each HTTP request to determine the exact set of operations that should be performed on a license key. Once the set of operations is determined, it is checked for absence of conflicting operations. Then, all operations are sorted in the decreasing order of their priority. Finally, operations are executed one by one.
Operation priorities (the highest at the top, the lowest at the bottom):
- Either of: Move a license key to another owner, terminate, suspend, or resume a license key
- Upgrade a license key
- Activate or re-activate a license key
- Bind a license key to an IP address or unbind a license key from an IP address
- Assign a product configuration to a license key
- Attach and re-attach to the parent key, detach from the parent key
- Rebuild key items in the way they are stored on the server side
- Update a license key short description (nickname)
- Update the autoRenew flag.
Example
Request:
PUT /30/keys/12345678?return-key-state=yes HTTP/1.1
{
"items" : [ {
"externalId" : "98765",
"item" : "PLESK-12-WEB-ADMIN-1M"
},
{
"externalId" : "54321",
"item" : "FT-PLESK-5-LANGUAGE-PACKS-1M"
} ]
}
Response:
HTTP/1.1 200 OK
{
"ownerId" : "12345",
"keyIdentifiers" : {
"keyId" : 12345678,
...
}