Retrieving ID of Last Action

Use the get-last-id operation to retrieve the ID of the last action performed on the server.

In this chapter:

Request Packet

Response Packet Structure

Samples

 

Request Packet

A request XML packet retrieving the last action ID includes the get-last-id node:

<packet>
<event_log>
<get-last-id>
...  
</get-last-id>
</event_log>
</packet>

 

The get-last-id node has the following graphical representation:

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.

Data type: none.

 

Response Packet Structure

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

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-last-id operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the get-last-id operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the get-last-id operation fails. Data type: string.
  • The id node is optional. It holds the last action ID. Data type: integer.
 

Samples

This request packet retrieves the last action ID.

<packet>
<event_log>
   <get-last-id/>
</event_log>
</packet>

Response:

<packet>
<event_log>
   <result>
      <status>ok</status>
      <id>178</id>
   </result>
</event_log>
</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.