Populate Action
Performing a POST /api/actions/{id}/query
would yield a response object that
includes the resources that the action would apply to with the populated values of each action
context field for the resource. The response contains information about the parameters to the
action's method. It also includes a sample input that would be used for running the action with POST /api/actions/{id}
if you chose to run it on all applicable resources
and not change the default input values.
The json result inside actionExecution can be used directly as input perform the action. In the xml
result, the xml element ops:action-execution will need namespace binding added to it in order to use it
in the request.xmlns:ops="http://webservice.vmware.com/vRealizeOpsMgr/1.0/"
The Id for the action to be populate.
The additional information needed to populate the action.
Show optional properties
{
"contextResourceId": [
{}
]
}
"{\n \"contextResourceId\" : [ \"c5af764a-d4d5-4258-829c-8acb0604e4c7\" ]\n}"
The UUID list of the resources that the population will be run against
The populated action information
"{\n \"id\" : \"VMWARE-Power Off VM\",\n \"actionContext\" : {\n \"id\" : \"Power Off VM\",\n \"fields\" : [ {\n \"id\" : \"Name\",\n \"name\" : \"VM Name\",\n \"component\" : \"textfield\",\n \"input\" : false,\n \"displayOrder\" : 0,\n \"hidden\" : false,\n \"expressionResults\" : [ \"MyVMName\" ]\n } ]\n },\n \"methodParameters\" : [ {\n \"id\" : \"mOR\",\n \"dataType\" : \"String\",\n \"isRequired\" : true,\n \"isList\" : false\n } ],\n \"action-execution\" : {\n \"contextId\" : \"PowerOffVM\",\n \"contextResourceId\" : [ \"7e780215-da07-4da1-9167-cd6892dcfdd8\" ],\n \"parameterGroup\" : [ {\n \"resourceId\" : \"7e780215-da07-4da1-9167-cd6892dcfdd8\"\n } ]\n }\n}"
The key of the populated action
Represents an executable step within an action. It defines which method the step calls and what fields related to this step.
The resource ids that apply to the populated action
The parameters for the method that was populated
Contains describe instance data about performing an action.
Represents a HTTP 'link' element.
It is implicit that all the link tags support http 'GET' method.
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"contextResourceId":["string"]}' https://{api_host}/suite-api/api/actions/{id}/query