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).

Warning: This command does not yet support the parameters that users enter when they buy licenses, such as "Capacity in 100GB blocks" (used for Virtuozzo storage licenses). Also, this command supports only Partner API 3.0 constants. It does not support Partner API 1.0 constants.

Response:

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):

  1. Either of: Move a license key to another owner, terminate, suspend, or resume a license key
  2. Upgrade a license key
  3. Activate or re-activate a license key
  4. Bind a license key to an IP address or unbind a license key from an IP address
  5. Assign a product configuration to a license key
  6. Attach and re-attach to the parent key, detach from the parent key
  7. Rebuild key items in the way they are stored on the server side
  8. Update a license key short description (nickname)
  9. 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,
    ...
}

  

 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.