Execute Action


This API will be used to execute the actions that are configured in Applications Manager. An Operator can only execute an action that is associated to him.

Syntax

API for XML Response:

https://[HOST]:[PORT]/AppManager/xml/ExecuteAction?apikey=[ API Key ]&ActionId=[ACTION ID]

API for JSON Response:

https://[HOST]:[PORT]/AppManager/json/ExecuteAction?apikey=[ API Key ]&ActionId=[ACTION ID]

Supported HTTP methods: GET, POST

Allowed roles: Administrator, Operator

Request Parameters

Field Description
ActionId This value specifies the action id and helps the API to execute the corresponding action.

Sample Request

XML Input:

https://apm-prod-server:8443/AppManager/xml/ExecuteAction?apikey=aaaaaabbbbbbccccccddddddeeeeee&ActionId=10000056

XML Response:

<AppManager-response uri="/AppManager/xml/ExecuteAction">
<result>
<response response-code="4000">
<ExecuteAction ActionTypeID="2" Status="Success" ActionExecPath="/common/executeSMS.do?method=testAction&actionID=10000004" Message="The action test1 has been successfully executed" ActionName="test1" ActionID="10000004" ActionType="SMS Action(s)"/>
</response>
</result>
</AppManager-response>

JSON Input:

https://apm-prod-server:8443/AppManager/json/ExecuteAction?apikey=aaaaaabbbbbbccccccddddddeeeeee&ActionId=10000056

JSON Response:

{"response-code":"4000","response":{"uri":"/AppManager/json/ExecuteAction","result":[{"ActionTypeID":"1","Status":"Success","ActionExecPath":"/common/executeAction.do?method=testAction&actionID=20000003","Message":"The action alert_mail has been successfully executed","ActionName":"alert_mail","ActionID":"20000003","ActionType":"E-mail Action(s)"}]}}

Note: For the Actions like Ec2Instance / VMActions / Service actions (Start/ Stop/ Restart) will execute the action directly whereas in UI we are asking the user to send a test mail or to execute the action.