Develop > Web Service Interfaces > Action Web Service Interface

Action Web Service Interface

The REST- based Action Web Service enables integrators to access the following functionality from an external application:

  • Execute an arbitrary command string on one or more monitored nodes. Requests can be run in parallel.

    A command type must be specified. A command can be executable (default), Perl script, VBScript, JavaScript, or Windows Scripting Host script. The script code must be passed in the web service call. For Unix agents, commands are executed in a shell. For Windows agents, commands are not executed in a shell. For example, an "echo hello world" command would read echo hello world on Unix and cmd /c echo hello world on Windows.

    Target hosts can be specified by hostname (from the RTSM) and by IP address.

    Requests are dropped when the OMi backend is disabled or restarted. In some cases, an Action Web Service request will not finish. For example, if you use the ovc- stop command to stop the action agent process, which sends back a call response, the call will continue to run until the OMi backend is disabled or restarted.

    On the agents, environment variables like OvDataDir, OvInstallDir, and so on are predefined. For a complete list you can call the OMi server using the following command:

    $ <OvBinDir>/ovdeploy –cmd set [ -host <remoteHost> ] | grep “Ov”

    Linux output: OvBinDir = /opt/OV/bin

    Windows output: Program Files\HP\HP BTO Softeare\bin\win64

  • Cancel the command on the managed nodes.

  • Retrieve the command status for the managed nodes.

    The OMi backend keeps the execution results for 10 minutes after the last managed node has finished execution. Web service clients must retrieve the results in that time period.

  • Retrieve the detailed command status for a specific managed node.

The Action Web Service only triggers command strings entered by the user. In this case, an "action" is an arbitrary string entered by the web service user, as opposed to a "tool", which is a predefined string stored in the database. The Action Web Service does not trigger automatic actions or user actions.

For further information about actions, see Actions

For information about tools, see Tools.

When using a JAVA client, the classes provided in the opr-external-api.jar can be used to marshal or unmarshal the XML content directly. See also the example code in <OMi_HOME>/opr/examples/action-ws-client