Owners Manual

RESTful Web Service | Actions and Adaptive CLI
OMNM 6.5.2 User Guide 627
5
GET http://localhost:8089/rest/actiondefs/{oid-from-4}/sample-json
This returns a JSON structure that you can populate, such as:
TokenActionName: dp_getToken
URL: http://192.168.54.43:8089/rest/actiondefs/
com.dorado.redcell.inventory.task.TaskDefinition::ZvfczDh-e60G03-sQ-
1.313/sample-json
Method: GET
The result after execution:
{"name":"dp_getDate","description":null,"oid":null,"target":null,"definit
ionOid":"com.dorado.redcell.inventory.task.TaskDefinition::ZvfczDh-
e60G03-sQ-
1.313","sessionId":null,"status":null,"ordinal":0,"groupId":null,"lastE
xecuted":null,"lastModified":null,"dateCreated":null,"dataValues":[]}
6
POST http://localhost:8089/rest/actions/
The JSON structure from the previous step creates a task in OMNM:
TokenActionName: dp_getToken
URL: http://192.168.54.43:8089/rest/actions/
Method:POST
{
"name":"Cisco 'show
hardware'","description":null,"oid":null,"target":"com.dorado.redcell.d
evicedriver.cisco.ciscorouter.CiscoRouter::WFKyfBmJkHo3G03","definition
Oid":"com.dorado.redcell.inventory.task.TaskDefinition::ZvfczDh-e60G03-
sQ-
1.313","sessionId":null,"status":null,"ordinal":0,"groupId":null,"lastE
xecuted":null,"lastModified":null,"dateCreated":null,"dataValues":[]}
}
7
PUT http://localhost:8089/rest/actions/{oid-from-6}/execute
Executes the following task:
TokenActionName: getToken
URL: http://192.168.54.43:8089/rest/actions/
com.dorado.redcell.inventory.task.TaskDefinition::ZvfczDh-e60G03-sQ-
1.313/execute
Method:PUT
{
"name":"Cisco 'show
hardware'","description":null,"oid":null,"target":"com.dorado.redcell.d
evicedriver.cisco.ciscorouter.CiscoRouter::WFKyfBmJkHo3G03","definition
Oid":"com.dorado.redcell.inventory.task.TaskDefinition::ZvfczDh-e60G03-
sQ-
1.313","sessionId":null,"status":null,"ordinal":0,"groupId":null,"lastE
xecuted":null,"lastModified":null,"dateCreated":null,"dataValues":[]}
}