Owners Manual

RESTful Web Service | Actions and Adaptive CLI
628 OMNM 6.5.2 User Guide
Calling an Independent Token Generation Action
If a cached token has expired or is invalid, OpenManage Network Manager generates a new token
by calling an independent action and saves it in cache. This executes an action requiring
authentication.
The format of token generation script (mg_os_generateTokenOnly) is as follows:
TOKEN_BEGIN
TokenProperty: X_Auth_Token
TokenAccessParams: access.token.id
URL:http://10.101.53.2:5000/v2.0/tokens
Method:POST
{
"auth": {"tenantName": "admin","passwordCredentials":
{"username":"admin","password":"admin"} }
}
TOKEN_END
The format of a script that uses this token generated by
mg_os_synergy_generateTokenOnly
is:
TokenActionName: mg_os_synergy_generateTokenOnly
URL: http://localhost:8089/rest/actiondefs/
Method:GET
In such a script, TokenActionName is the name of the token generation RESTful Web Services
Action.
Supported Script Formats
The following sample scripts confirm to the designed format:
Sample scripts that do not need authentication
Sample scripts of a token generation action
Sample scripts that use a token generation action
Sample scripts that combine token generation and execution in one action
Sample scripts that do not need authentication
URL:http://headers.jsontest.com/
Method:GET
URL:http://10.101.53.2:5000/v2.0/tokens
Method:POST
{
"auth": {"tenantName": "admin","passwordCredentials":
{"username":"admin","password":"admin"} }
}