Removing Secret Key
Use the delete operation to remove a specified secret key from the server.
Request Packet Structure
A request XML packet removing a secret key includes the delete operation node:
<packet version="1.6.7.0">
<secret_key>
<delete>
...
</delete>
</secret_key>
</packet>
The delete node has the following graphical representation:
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.
- The filter node is required. It specifies the filtering rule. To remove all secret keys located on the server, use the blank filter node (<filter/>). Data type: complex.
- The key node is optional. To remove a specified key, set the key value for this node. Data type: string.
Remarks
You can remove multiple secret keys in a single packet. Add as many key parameters to the filter as the number of keys to be removed.
<filter>
<key>...</key>
...
<key>...</key>
</filter>
Response Packet Structure
The delete node of the output XML packet is structured as follows:
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.
- The result node is required. It wraps the response retrieved
from the server. Data type: resultType (
common.xsd
). - The status node is required. It specifies the execution status of the delete operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the delete operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the delete operation fails. Data type: string.
- The key node is optional. It holds the key value if the operation succeeds. Data type: string.
Samples
Removing a secret key
This request packet removes secret key 6575fae36288be6d1bad40b99808e37f.
<packet version="1.6.7.0">
<secret_key>
<delete>
<filter>
<key>6575fae36288be6d1bad40b99808e37f</key>
</filter>
</delete>
</secret_key>
</packet>
Response:
<packet version="1.6.7.0">
<secret_key>
<delete>
<result>
<status>ok</status>
<key>6575fae36288be6d1bad40b99808e37f</key>
</result>
</delete>
</secret_key>
</packet>
If the key was not found on the server, the response looks as follows:
<packet version="1.6.7.0">
<secret_key>
<delete>
<result>
<status>error</status>
<errcode>1013</errcode>
<errtext>Secret key does not exist</errtext>
<key>6575fae36288be6d1bad40b99808e37f</key>
</result>
</delete>
</secret_key>
</packet>
Removing multiple secret keys
This request packet removes secret keys 6575def8 and 6576d1ef7.
<packet version="1.6.7.0">
<secret_key>
<remove>
<filter>
<key>6575def8</key>
<key>6576d1ef7</key>
</filter>
</remove>
</secret_key>
</packet>
Reponse:
<packet version="1.6.7.0">
<secret_key>
<delete>
<result>
<status>ok</status>
<key>6575def8</key>
</result>
<result>
<status>ok</status>
<key>6576d1ef7</key>
</result>
</delete>
</secret_key>
</packet>