Owners Manual
RESTful Web Service | Actions and Adaptive CLI
626 OMNM 6.5.2 User Guide
The standard Request Properties form-urlencoded are part of the execution code and do not need
to be specified:
Accept: application/json
Content-Type:application/json;charset=UTF-8
Base64 encoding Content-Type:application/x-www-
Calling an Adaptive CLI
The following returns a list of services from the REST call with this JSON script:
URL: http://192.168.54.43:8089/rest/application.wadl
Method: GET
PropertyName: Accept PropertyValue: application/xml
The following example executes an ACLI action using a REST call:
1
POST http://localhost:8089/rest/auth
{ "username" : "admin", "password" : "secretpassword" }
This works like OpenStack’s API, you get a tokenId from that call, add it to the request header
"X-Auth-Token" : tokenId
on subsequent calls.
Alternatively, create a getToken action to reuse:
TOKEN_BEGIN
TokenProperty: X-Auth-Token
TokenAccessParams: tokenId
URL:http://192.168.54.43:8089/rest/auth
Method:POST
{
"username" : "admin",
"password" : "admin"
}
TOKEN_END
2
GET http://localhost:8089/rest/actiondefs/
3
Pick a suitable ACLI that you want to call:
TokenActionName: getToken
URL: http://192.168.54.43:8089/rest/actiondefs/
Method:GET
4
Select this action oid from the result payload:
{
"name":"Cisco \u0027show hardware\u0027",
"oid":"com.dorado.redcell.inventory.task.TaskDefinition::ZvfczDh-
e60G03-sQ-1.313",
"description":"show hardware",
"family":"Adaptive CLI",
"targetType":"EquipmentManager",
"implementor":"AC_Config"
},