To retrieve information on secret keys located on the server, use the **get_info** operation.
Note For security reasons, the **get_info** operation does not show secret keys themselves. It shows only additional information (for example, the secret key ID).
## Request Packet Structure A request XML packet that retrieves information on secret keys includes the **get_info** operation node:
<packet>
    <secret_key>
        <get_info>
            ...
        </get_info>
    </secret_key>
</packet>
The **get_info** node has the following graphical representation:
image 37146
Note The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.9.1/agent_input.svg.
- The **filter** node is *required*. It specifies the filtering rule. To retrieve information on all secret keys located on the server, use the blank filter node (``). Data type: *complex*. - The **key** node is *optional*. To retrieve information on the desired secret key, specify its value or ID for this node. Data type: *string*. **Remarks** You can retrieve information on multiple secret keys in a single request. To do so, add as many **key** parameters to **filter** as many secret keys you have whose information you want to retrieve.
<filter>
   <key>...</key>
   ...
   <key>...</key>
</filter>
## Response Packet Structure The **get_info** node of the response XML packet is structured as follows:
image 75881
Note The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.9.1/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 **get_info** operation. Data type: *string*. Allowed values: ok \| error. - The **errcode** node is *optional*. Is returns an error code if the **get_info** operation fails. Data type: *integer*. - The **errtext** node is *optional*. It returns an error message if the **get_info** operation fails. Data type: *string*. - The **key** node is *optional*. It holds the secret key value if the operation fails. Data type: *string*. - The **key_info** node is *optional*. It holds information on the secret key if the operation succeeds. Data type: *SecretKeyInfo* (`plesk_secretkeys.xsd`). The following parameters are nested in the **key_info** node: - The **key** node is *required*. It holds the secret key ID. Data type: *integer*. - The **ip_address** node is *required*. It holds the IP address assigned to the secret key. Data type: *ip_address* (`common.xsd`). - The **description** node is *required*. It holds the secret key description. Data type: *string*. - The **login** node is *required*. It holds the login name of the Plesk customer or reseller the secret key was assigned to. If you did not specify any login name creating the secret key, the node will contain the administrator login name. Data type: *string*.
## Samples
## Retrieving Information on a Secret Key The following request retrieves information on the secret key `ff4464d9-468d-3664-26bb-c87606941502`:
<packet>
    <secret_key>
        <get_info>
            <filter>
                <key>ff4464d9-468d-3664-26bb-c87606941502</key>
            </filter>
        </get_info>
    </secret_key>
</packet>
Response:
<packet>
    <secret_key>
        <get_info>
            <result>
                <status>ok</status>
                <key_info>
                    <key>17</key>
                    <ip_address>192.0.2.1</ip_address>
                    <description/>
                    <login>admin</login>
                </key_info>
            </result>
        </get_info>
    </secret_key>
</packet>
If the secret key was not found on the server, the response will look as follows:
<packet>
    <secret_key>
        <get_info>
            <result>
                <status>error</status>
                <errcode>1013</errcode>
                <errtext>Key is not found</errtext>
                <key>ff4464d9-468d-3664-26bb-c87606941502</key>
            </result>
        </get_info>
    </secret_key>
</packet>
## Retrieving Information on Multiple Secret Keys The following request retrieves information on the secret keys `0a45eb21-a9e7-4051-9ae8-a8f5d996874e` and `42287e35-cd85-da41-f4f5-cc5f0aee4aaa`:
<packet>
    <secret_key>
        <get_info>
            <filter>
                <key>0a45eb21-a9e7-4051-9ae8-a8f5d996874e</key>
                <key>42287e35-cd85-da41-f4f5-cc5f0aee4aaa</key>
            </filter>
        </get_info>
    </secret_key>
</packet>
Response:
<packet>
    <secret_key>
        <get_info>
            <result>
                <status>ok</status>
                <key_info>
                    <key>18</key>
                    <ip_address>192.0.2.1</ip_address>
                    <description/>
                    <login>user1</login>
                </key_info>
            </result>
            <result>
                <status>ok</status>
                <key_info>
                    <key>19</key>
                    <ip_address>192.0.2.1</ip_address>
                    <description/>
                    <login>user2</login>
                </key_info>
            </result>
        </get_info>
    </secret_key>
</packet>
## Retrieving Information on All Secret Keys The following request retrieves information on all secret keys located on the server:
<packet>
    <secret_key>
        <get_info>
            <filter>
           </filter>
        </get_info>
    </secret_key>
</packet>
Response:
<packet>
    <secret_key>
        <get_info>
            <result>
                <status>ok</status>
                <key_info>
                    <key>5</key>
                    <ip_address>192.0.2.1</ip_address>
                    <description/>
                    <login>admin</login>
                </key_info>
            </result>
            <result>
                <status>ok</status>
                <key_info>
                    <key>6</key>
                    <ip_address>192.0.2.1</ip_address>
                    <description/>
                    <login>customer</login>
                </key_info>
            </result>
        </get_info>
    </secret_key>
</packet>