Retrieving settings of a single domain
The following request packet retrieves Log Rotation settings of domain example.com:
<packet version="1.5.0.0">
<log-rotation>
<get>
<filter>
<domain-name>example.com</domain-name>
</filter>
</get>
</log-rotation>
</packet>
A positive response from the server can look as follows:
<packet version="1.5.0.0">
<log-rotation>
<get>
<result>
<filter-id>example.com</filter-id>
<id>33</id>
<settings>
<log-condition>
<log-bysize>2073741824</log-bysize>
</log-condition>
<log-max-num-files>1</log-max-num-files>
<log-compress>true</log-compress>
</settings>
</result>
</get>
</log-rotation>
</packet>
If the domain was not found, the response from the server looks as follows:
<packet version="1.5.0.0">
<log-rotation>
<get>
<result>
<status>error</status>
<errcode>1013</errcode>
<errtext>domain does not exist</errtext>
<filter-id>example.com</filter-id>
</result>
</get>
</log-rotation>
</packet>
If a packet sender has no rights to manage physical hosting, the response looks as follows:
<packet version="1.5.0.0">
<log-rotation>
<get>
<result>
<status>error</status>
<errcode>1006</errcode>
<errtext>Access denied</errtext>
<filter-id>example.com</filter-id>
</result>
</get>
</log-rotation>
</packet>
If the domain is not hosted physically, the response from the server looks as follows:
<packet version="1.5.0.0">
<log-rotation>
<get>
<result>
<status>error</status>
<errcode>1034</errcode>
<errtext>The domain is not hosted physically</errtext>
<filter-id>example.com</filter-id>
</result>
</get>
</log-rotation>
</packet>
Retrieving settings of multiple domains
The following request packet retrieves Log Rotation settings of domains used by the clients with ID 5 and ID 8:
<packet version="1.5.0.0">
<log-rotation>
<get>
<filter>
<client-id>5</client-id>
<client-id>8</client-id>
</filter>
</get>
</log-rotation>
</packet>
If the client with ID 5 was not found on the server and the client with ID 8 runs two domains (ID 17 and 29) the response from the server looks as follows:
<packet version="1.5.0.0">
<log-rotation>
<get>
<result>
<status>error</status>
<errcode>1015</errcode>
<errtext>client does not exist</errtext>
<filter-id>5</filter-id>
</result>
</get>
<get>
<result>
<status>ok</status>
<filter-id>8</filter-id>
<id>17</id>
<settings>
<log-condition>
<log-bysize>2073741824</log-bysize>
</log-condition>
<log-max-num-files>1</log-max-num-files>
<log-compress>true</log-compress>
</settings>
</result>
</get>
<get>
<result>
<status>ok</status>
<filter-id>8</filter-id>
<id>29</id>
<settings>
<log-condition>
<log-bysize>2073741824</log-bysize>
</log-condition>
<log-max-num-files>1</log-max-num-files>
<log-compress>true</log-compress>
</settings>
</result>
</get>
</log-rotation>
</packet>