InvokeIDOMethod
The InvokeIDOMethod API returns a list of properties and their attributes from an IDO
collection.
Parameters
Name | In | Required? | Description |
---|---|---|---|
ido | Path | Yes | This is the name of the IDO collection. |
method | Query | Yes | This is the name of the IDO method. |
Headers
Name | Description |
---|---|
Authorization | If the API is called directly, then the Mongoose security token
is obtained through a call to the GetSecurityToken API. If the API is called through the ION API, then a valid OAuth2.0 bearer token is provided by the 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
[
"sa",
null,
null,
null,
null
]
Response data
{ "Message": null, "Success": true, "Parameters": [ "sa", "4", "1", "CoreFormsAdmin", "" ], "ReturnValue": "0" }
Example
This example code determines the user attributes of user sa using the IDO method GetUserAttributes.
string json = string.Empty; using ( HttpClient client = new HttpClient() ) { string ido = "UserNames"; string method = "GetUserAttributes"; string requestUrl = $"http://server/IDORequestService/ido/invoke/{ido}?method={method}"; // provide token in the Authorization header client.DefaultRequestHeaders.TryAddWithoutValidation( "Authorization", "b/XdI6IQzCviZOGJ0E+002DoKUFOPmVDkwpQDbQj…==" ); string[] parameters = new[] { "sa", "", "", "", "" }; // pass the array of parameters as the request data string contentStr = JsonConvert.SerializeObject( parameters ); // send the post request HttpResponseMessage response = client.PostAsync( requestUrl.ToString(), new StringContent( contentStr, Encoding.UTF8, "application/json" ) ).Result; using ( HttpContent content = response.Content ) { Task<string> result = content.ReadAsStringAsync(); json = result.Result; } }