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.
Request Packet Structure
A request XML packet retrieving actions log includes the get_events node:
The get_events node has the following graphical representation:
- The lastId node is optional. It specifies the ID of an action to start from. Data type: integer.
Note: To retrieve all actions performed on the server, do not specify this node.
- The events field is optional.
- The type field is optional. It is required if the events node is specified. It defines the type of events to be retrieved. Data type: string.
- The class field is optional. It is required if the events node is specified. It defines the class of events to be retrieved. Data type: string.
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:
- The result node is required. It wraps the response retrieved from the server. Data type: resultType (
- 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.
The following nodes are required only if the event node is present in the response packet:
- The id node is required. It holds action ID. Data type: integer.
- 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 obj_id node is required. It specifies the unique field of an object that performed the action. Data type: string.
- The user node is required. It specifies the login name of a user who performed the action. Data type: string.
- The host node is required. It specifies the IP address of a host from which the action was performed. Data type: string
This packet retrieves the Action log starting from the action with ID 177.
If the ID is more than last operation ID, the response looks as follows: