Retrieving Action Log Parts

Use the get-events operation to retrieve the Action log starting from a specified action, or all events of the specified type or class. For information on retrieving the ID of last action, refer to the Retrieving ID of Last Action section.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving actions log includes the get_events node:

<packet>
<event_log>
<get_events>
...  
</get_events>
</event_log>
</packet>

 

The get_events node has the following graphical representation:

getEvent

Note: To retrieve all actions performed on the server, do not specify this node.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

 

Response Packet Structure

The get_events node of the output XML packet is structured as follows:

 

Samples

This packet retrieves the Action log starting from the action with ID 177.

<packet>
<event_log>
   <get_events>
      <lastId>177</lastId>
   </get_events>
</event_log>
</packet> 

Response:

<packet>
<event_log>
   <get_events>
 
   <result>
      <status>ok</status>
 
      <event>
      <id>177</id>
      <type>updated</type>
      <time>1165055109</time>
      <class>dns_zone</class>
      <obj_id>Mysite.com</obj_id>
      <user>myUser</user>
      <host>192.168.56.53</host>
      </event>
 
      <event>
      <id>178</id>
      <type>created</type>
      <time>1165055209</time>
      <class>mailname</class>
      <obj_id>mail@Mysite.com</obj_id>
      <user>myUser</user>
      <host>192.168.56.53</host>
      </event>
 
   </result>
 
   </get_events>
</event_log>
</packet>

 

If the ID is more than last operation ID, the response looks as follows:

<packet>
<event_log>
   <get_events>
 
   <result>
      <status>ok</status>
   </result>
 
   </get_events>
</event_log>
</packet>