partner10.getKeyNumbers
Purpose
Searches for Key numbers by specified list of IPs and MACs; returns a list of matching Key numbers. The result will be limited to licenses that are accessible for the API account - there could be other licenses with these IP addresses not included in the result.
Signature
Method name: partner10.getKeyNumbers
Parameters
# | Type | Description |
---|---|---|
1 | struct AuthInfo | client authentication information |
2 | struct ServerAddress | contains a list of IP and MAC addresses, where the search is performed |
Note: MAC address is optional for this function.
Returns
Field | Type | Description |
---|---|---|
resultCode | int | code for command execution result (see below) |
resultDesc | string | textual description of command execution result (see below) |
keyNumbers | array(string) | unordered collection of found key numbers in format PLSK.01234567.0123 |
keyInfos | array(struct RemoteAPIKeyInfo) | unordered collection of descriptions for found keys |
Result Codes
resultCode | resultDesc |
---|---|
100 | Found: <key number>, <key number> … |
101 | No keys found |
200 | Client authorization failed |
201 | Access to this method is denied |
300 | Internal error, please try after some time |
400 | Incorrect authorization info format |
401 | Incorrect server info format |
405 | Incorrect IP address format |
406 | Incorrect MAC address format |
XML Examples
Request message
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>partner10.getKeyNumbers</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>login</name>
<value>
<string>API_LOGIN</string>
</value>
</member>
<member>
<name>password</name>
<value>
<string>API_PASSWORD</string>
</value>
</member>
</struct>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>ips</name>
<value>
<array>
<data>
<value>
<string>192.168.0.1</string>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Response message
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>resultCode</name>
<value>
<int>100</int>
</value>
</member>
<member>
<name>keyNumbers</name>
<value>
<array>
<data>
<value>PLSK.00123456.0002</value>
<value>PLSK.00123457.0000</value>
</data>
</array>
</value>
</member>
<member>
<name>resultDesc</name>
<value>Found: PLSK.00123456.0002, PLSK.00123457.0000</value>
</member>
<member>
<name>keyInfos</name>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>createDate</name>
<value>
<dateTime.iso8601>20051111T20:10:00</dateTime.iso8601>
</value>
</member>
<member>
<name>type</name>
<value>MAIN</value>
</member>
<member>
<name>keyNumber</name>
<value>PLSK.00123456.0002</value>
</member>
<member>
<name>lastReportingIp</name>
<value>192.168.0.1</value>
</member>
<member>
<name>terminated</name>
<value>
<boolean>0</boolean>
</value>
</member>
<member>
<name>keyType</name>
<value>Plesk(TM) 7.5/7.6 for Windows for Virtuozzo (Lease)</value>
</member>
<member>
<name>lastReportingDate</name>
<value>
<dateTime.iso8601>20051111T20:10:00</dateTime.iso8601>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>createDate</name>
<value>
<dateTime.iso8601>20060202T20:07:00
</dateTime.iso8601>
</value>
</member>
<member>
<name>type</name>
<value>MAIN</value>
</member>
<member>
<name>keyNumber</name>
<value>PLSK.00123457.0000</value>
</member>
<member>
<name>lastReportingIp</name>
<value>192.168.0.1</value>
</member>
<member>
<name>terminated</name>
<value>
<boolean>1</boolean>
</value>
</member>
<member>
<name>keyType</name>
<value>Plesk(TM) 7.5/7.6 for Windows for Virtuozzo (Lease)</value>
</member>
<member>
<name>lastReportingDate</name>
<value>
<dateTime.iso8601>20060202T20:07:00</dateTime.iso8601>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>