Use the enable operation to enable Log Rotation service on sites.
A request XML packet enabling Log Rotation service includes the enable operation node:
<packet version="1.5.0.0">
<log-rotation>
<enable>
...
</enable>
</log-rotation>
</packet>
The enable node is presented by type LogRotationEnableInput (logrotation.xsd
), and its graphical representation is as follows:
logrotation.xsd
).Remarks
You can use different filtering rules in a single packet. Add as many enable operations as the number of different filtering rules.
<packet version="1.5.0.0">
<log-rotation>
<enable>
...
</enable>
...
<enable>
...
</enable>
</log-rotation>
</packet>
The enable node of the output XML packet is presented by type LogRotationEnableOutput (logrotation.xsd
) and structured as follows:
common.xsd
).
The following request packet enables Log Rotation service on site example.com:
<packet>
<log-rotation>
<enable>
<filter>
<site-name>example.com</site-name>
</filter>
</enable>
</log-rotation>
</packet>
Response:
<packet>
<log-rotation>
<enable>
<result>
<status>ok</status>
<filter-id>example.com</filter-id>
<id>33</id>
</result>
</enable>
</log-rotation>
</packet>
The following request packet enables Log Rotation service on domains used by the customers with ID 5 and ID 8:
<packet>
<log-rotation>
<enable>
<filter>
<owner-id>5</owner-id>
<owner-id>8</owner-id>
</filter>
</enable>
</log-rotation>
</packet>
Response (if the customer with ID 5 was not found on the server and the customer with ID 8 runs two domains (ID 17 and 29)):
<packet>
<enable>
<log-rotation>
<result>
<status>error</status>
<errcode>1015</errcode>
<errtext>customer does not exist</errtext>
<filter-id>5</filter-id>
</result>
</enable>
<enable>
<result>
<status>ok</status>
<filter-id>8</filter-id>
<id>17</id>
</result>
</enable>
<enable>
<result>
<status>ok</status>
<filter-id>8</filter-id>
<id>29</id>
</result>
</enable>
</log-rotation>
</packet>