Users Guide
RESTful Web Service | Actions and Adaptive CLI
OMNM 6.5.3 User Guide 629
Sample scripts of a token generation action
TOKEN_BEGIN
TokenProperty: X-Auth-Token
TokenAccessParams: tokenId
TokenExpiryTime: 86400
URL:http://192.168.53.50:8089/rest/auth/
Method:POST
{ "username" : "admin", "password" : "admin" }
TOKEN_END
The following script contains all available fields for demonstration purposes.
TOKEN_BEGIN
TokenProperty: X-Auth-Token
TokenPrefix:Bearer
TokenPostfix:
TokenAccessParams: access.token.tokenId
TokenExpiryTime: 86400
TokenAuthenticationType:Base64
TokenAuthenticationID:abc:xyz
URL:http://localhost:8089/rest/auth/
Method:POST
RequestPropertyName:abc RequestPropertyValue:def
RequestPropertyName:ghi RequestPropertyValue:jkl
{ "username" : "admin", "password" : "admin" }
TOKEN_END
CAUTION:
You must format JSON script headers (example: Accept:application/xml) as follows:
PropertyName:Accept PropertyValue:application/xml.
Sample scripts that use a token generation action
TokenActionName: mg_synergy_generateTokenOnly
URL: http://localhost:8089/rest/actiondefs/
Method:GET
TokenActionName:mg_pp_tokenGenerationOnly
URL:https://api.sandbox.paypal.com/v1/payments/payment
RequestMethod:GET