Retrieving Action Log

Use the get-events operation to retrieve the whole Action log.

In this chapter:

Request Packet

Response Packet Structure

Samples

 

Request Packet

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

<packet>
<event_log>
<get>
</get>
</event_log>
</packet>

 

The get node has the following graphical representation:

getActionLog

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The flush_selected_range node is optional. It specifies if the selected actions will be deleted after retrieving. Data type: boolean.

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

 

Response Packet Structure

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

GetRePS

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/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_events operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the get_events operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the get_events operation fails. Data type: string.
  • The event node is optional. It contains an action data if the operation succeeds, and the list of retrieved actions is not empty. Data type: complex.

    getRePSEvent

    The following nodes are required only if the event node is present in the response packet:

    • The type node is required. It specifies the type of the action. Data type: string. Allowed values: created | updated | deleted | status_changed | started | stopped | installed | uninstalled | siteapp_added | siteapp_removed | expired | terminated | exceeded | guid_changed.
    • The time node is required. It specifies time when the action happened (in Unix timestamp). Data type: unsignedint.
    • The class node is required. It specifies the class of object that performed the action. Data type: string. Allowed values: license | service | ip_address | admin_info | siteapp | client | client_limits | client_status | client_prefs | client_perms | client_ip_pool | db | db-user | site | domain | domain_limits | domain_user| domain_status | phosting | fhosting | subdomain | mailname | webuser | maillist | dns_zone | mailname_antivirus | mailname_spamfilter | mailname_mailgroup | mailname_autoresponder | mailname_attachment | session_preferences | db_server | domain_alias | remote_dns | dashboard_preset | dashboard_preset_type | dashboard_preset_name | domain_limit_size | client_limit_size | client_limit_traffic | domain_limit_traffic | plesk_component reseller | reseller_limits | reseller_status | reseller_prefs | reseller_perms | reseller_ip_pool | reseller_limit_size | reseller_limit_traffic | health_parameter
    • The id node is required. It specifies the unique field of an object that performed the action. Data type: string.
 

Samples

Request packet samples

This packet retrieves the Action log.

<packet>
<event_log>
   <get/>
</event_log>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet>
  <event_log>
    <get>
      <result>
        <status>ok</status>
        <event>
          <type>status_changed</type>
          <time>1300138583</time>
          <class>domain</class>
          <id>tgb.yu</id>
        </event>
        <event>
          <type>status_changed</type>
          <time>1300138583</time>
          <class>domain</class>
          <id>tgb.ru</id>
        </event>
        <event>
          <type>status_changed</type>
          <time>1300138583</time>
          <class>domain</class>
          <id>ab.cd</id>
        </event>
        <event>
          <type>guid_changed</type>
          <time>1300138583</time>
          <class>domain</class>
          <id>ab.cd</id>
        </event>
	   ... 
       </result>
  	  </get>
   </event_log>
</packet>

This packet retrieves the Action log and removes the actions.

<packet>
<event_log>
   <get>
    <options>
		<flush_selected_range>true</flush_selected_range>
	</options>
</get>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.