Fire AES Event
The Fire AES Event API fires an Application Event System (AES) event and,
optionally, returns all parameters.
Note: This topic is for REST Version 1. There is also an API for REST Version 2.
Parameters
Name | In | Required? | Description |
---|---|---|---|
responsetype | Path | Yes | Response request data format: Supply any of these values:
|
eventname | Query | Yes | This is the name of the AES event. |
parms | Query | No | This is a comma-delimited list of event parameters. Use this
format for parameters: parameter1(value), parameter2(value),
...
Note: If you have any parameters that include a comma as part of the parameter
value, you must change the comma to the escape sequence
\x2c before using this API. If you do not, parsing errors
occur when the AES event is fired.
|
returnparms | Query | No | This parameter is used as a flag for returning parameter values. |
Headers
Name | Description |
---|---|
Authorization | If the API is called directly, then a Mongoose security token
is obtained through a call to the GetSecurityToken API. If the API is called through ION API, then a valid OAuth2.0 bearer token is provided by ION API. |
X-Infor-MongooseConfig | This is the name of a configuration that is available on the application server. This is required only when using the Mongoose API through the ION API. |
Request data
None
Response data in XML format
<FireAESEventParmsInUrlXMLResponse xmlns="http://www.infor.com"> <FireAESEventParmsInUrlXMLResult xmlns:a="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:EventName>DivideNumbers</a:EventName> <a:Message> Input Parameters:
 Name: {Num1}, Value: {20}
 Name: {Num2}, Value: {5}
 Name: {Quotient}, Value: {0}
 Event execution success: False
 Output Parameters:
 Name: {Num1}, Value: {20}
 Name: {Num2}, Value: {5}
 Name: {Quotient}, Value: {4}
 AES Event execution complete
 </a:Message> <a:MessageCode>600</a:MessageCode> <a:Parameters> <Parameter> <Name>Num1</Name> <Value>20</Value> <Return>true</Return> </Parameter> <Parameter> <Name>Num2</Name> <Value>5</Value> <Return>true</Return> </Parameter> <Parameter> <Name>Quotient</Name> <Value>4</Value> <Return>true</Return> </Parameter> </a:Parameters> </FireAESEventParmsInUrlXMLResult> </FireAESEventParmsInUrlXMLResponse>
Response data in JavaScript format
{ "EventName": "DivideNumbers", "Parameters": [ { "Name": "Num1", "Value": "20", "Return": true }, { "Name": "Num2", "Value": "5", "Return": true }, { "Name": "Quotient", "Value": "4", "Return": true } ], "Message": "\tInput Parameters:\r\n\tName: {Num1}, Value: {20}\r\n\tName: {Num2}, Value: {5}\r\n\tName: {Quotient}, Value: {0}\r\n\tEvent execution success: False\r\n\tOutput Parameters:\r\n\tName: {Num1}, Value: {20}\r\n\tName: {Num2}, Value: {5}\r\n\tName: {Quotient}, Value: {4}\r\n\tAES Event execution complete\r\n", "MessageCode": 600 }
Example
This example code executes an AES event that divides two numbers and returns the quotient as an output parameter.
string xml = string.Empty; using ( HttpClient client = new HttpClient() ) { // optionally, you can use js as the response type string eventname = "DivideNumbers"; string parms = "Num1(120), Num2(6), Quotient(0)"; bool returnparms = true; bool debugmode = true; string requestUrl = $"http://server/IDORequestService/MGRESTService.svc/xml/aes/?eventname={eventname}&parms={parms}&returnparms={returnparms}&debugmode={debugmode}"; // provide token in the Authorization header client.DefaultRequestHeaders.TryAddWithoutValidation( "Authorization", "b/XdI6IQzCviZOGJ0E+002DoKUFOPmVDkwpQDbQj…==" ); HttpResponseMessage response = client.PostAsync( requestUrl, null ).Result; using ( HttpContent content = response.Content ) { Task<string> result = content.ReadAsStringAsync(); xml = result.Result; } }