Use the create operation to create a secret key.
Note: To create a secret key, you should specify the IP address this secret key will be linked to. Packets sent with this key from different IP's will not be proceeded by Plesk API RPC service.
Request Packet Structure
A request XML packet creating a secret key includes the create operation node:
The create node has the following graphical representation:
- The ip_address node is optional. It specifies the IP address that will be linked to the key. Data type: ip_address (
- The description node is optional. It specifies additional information about the key. Data type: string.
- The login node is optional. It specifies the login name of an existing customer or a reseller that will have this secret key. The customer's or reseller's account should be active. Data type: string.
You can create multiple secret keys in a single packet. Add as many create operations as the number of keys to be created.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The create node of the output XML packet is structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: resultType (
- The status node is required. It specifies the execution status of the create operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the create operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the create operation fails. Data type: string.
- The key node is optional. It holds the key value if the operation succeeds. Data type: string.
Creating a single secret key linked to IP address
This request packet creates the secret key for IP 192.0.2.1.
Creating a single secret key linked to IP address for a customer
This request packet creates the secret key linked to IP 192.0.2.1 for the customer user_demo.
Creating multiple secret keys
This request packet creates secret keys for User1, and for User2.